From 358e0183f5d922d5b8080f4c732e2ef7d2abdef8 Mon Sep 17 00:00:00 2001 From: decaseal Date: Mon, 2 Apr 2018 16:56:54 +0300 Subject: [PATCH] fix table function file [#add_table_function_file] --- dbms/src/TableFunctions/TableFunctionFile.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dbms/src/TableFunctions/TableFunctionFile.cpp b/dbms/src/TableFunctions/TableFunctionFile.cpp index d39c495c0ac..457ec4fbe52 100644 --- a/dbms/src/TableFunctions/TableFunctionFile.cpp +++ b/dbms/src/TableFunctions/TableFunctionFile.cpp @@ -13,6 +13,7 @@ #include #include #include +#include namespace DB { @@ -53,7 +54,8 @@ namespace DB throw Exception("Part path " + absolute_path + " is not inside " + clickhouse_path, ErrorCodes::LOGICAL_ERROR); // Create sample block - std::vector structure_vals = split(argument, " ,"); + std::vector structure_vals; + boost::split(structure_vals, structure, boost::algorithm::is_any_of(" ,"), boost::algorithm::token_compress_on); if (structure_vals.size() & 1) throw Exception("Odd number of attributes in section structure", ErrorCodes::LOGICAL_ERROR);