table function file - fix use storage file [#add_table_function_file]

This commit is contained in:
decaseal 2018-04-06 15:25:14 +03:00
parent 9ebe22dd2c
commit 29b94a0467

View File

@ -47,10 +47,10 @@ namespace DB
std::string path = static_cast<const ASTLiteral &>(*args[0]).value.safeGet<String>(); std::string path = static_cast<const ASTLiteral &>(*args[0]).value.safeGet<String>();
std::string format = static_cast<const ASTLiteral &>(*args[1]).value.safeGet<String>(); std::string format = static_cast<const ASTLiteral &>(*args[1]).value.safeGet<String>();
std::string structure = static_cast<const ASTLiteral &>(*args[2]).value.safeGet<String>(); std::string structure = static_cast<const ASTLiteral &>(*args[2]).value.safeGet<String>();
bool useStorageMemory = false; uint8_t useStorageMemory = 0;
if (args.size() == 4) if (args.size() == 4)
useStorageMemory = static_cast<const ASTLiteral &>(*args[2]).value.safeGet<bool>(); useStorageMemory = static_cast<const ASTLiteral &>(*args[2]).value.safeGet<UInt8>();
std::string db_data_path = context.getPath() + "data/" + escapeForFileName(context.getCurrentDatabase()); std::string db_data_path = context.getPath() + "data/" + escapeForFileName(context.getCurrentDatabase());