#include "config.h" #include "registerTableFunctions.h" #if USE_HDFS #include #include #include #include #include #include #include namespace DB { StoragePtr TableFunctionHDFS::getStorage( const String & source, const String & format_, const ColumnsDescription & columns, ContextPtr global_context, const std::string & table_name, const String & compression_method_) const { return std::make_shared( source, StorageID(getDatabaseName(), table_name), format_, columns, ConstraintsDescription{}, String{}, global_context, compression_method_); } ColumnsDescription TableFunctionHDFS::getActualTableStructure(ContextPtr context) const { if (structure == "auto") { context->checkAccess(getSourceAccessType()); return StorageHDFS::getTableStructureFromData(format, filename, compression_method, context); } return parseColumnsListFromString(structure, context); } void registerTableFunctionHDFS(TableFunctionFactory & factory) { factory.registerFunction(); } } #endif