From 6720a7c91f770c214ceedf95ace5a7489b5f7eca Mon Sep 17 00:00:00 2001 From: Nikolai Kochetov Date: Thu, 9 Jan 2020 21:51:39 +0300 Subject: [PATCH] Fix tests. --- dbms/src/TableFunctions/ITableFunctionFileLike.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dbms/src/TableFunctions/ITableFunctionFileLike.cpp b/dbms/src/TableFunctions/ITableFunctionFileLike.cpp index 7f056dd99fd..d7a6d8195e0 100644 --- a/dbms/src/TableFunctions/ITableFunctionFileLike.cpp +++ b/dbms/src/TableFunctions/ITableFunctionFileLike.cpp @@ -35,6 +35,9 @@ StoragePtr ITableFunctionFileLike::executeImpl(const ASTPtr & ast_function, cons if (args.size() < 2) throw Exception("Table function '" + getName() + "' requires at least 2 arguments", ErrorCodes::NUMBER_OF_ARGUMENTS_DOESNT_MATCH); + for (size_t i = 0; i < args.size(); ++i) + args[i] = evaluateConstantExpressionOrIdentifierAsLiteral(args[i], context); + std::string filename = args[0]->as().value.safeGet(); std::string format = args[1]->as().value.safeGet(); @@ -47,9 +50,6 @@ StoragePtr ITableFunctionFileLike::executeImpl(const ASTPtr & ast_function, cons throw Exception("Table function '" + getName() + "' requires 3 or 4 arguments: filename, format, structure and compression method (default auto).", ErrorCodes::NUMBER_OF_ARGUMENTS_DOESNT_MATCH); - for (size_t i = 0; i < args.size(); ++i) - args[i] = evaluateConstantExpressionOrIdentifierAsLiteral(args[i], context); - ColumnsDescription columns; std::string compression_method = "auto";