1 | #pragma once |
---|---|
2 | |
3 | #include <Common/config.h> |
4 | |
5 | #if USE_HDFS |
6 | |
7 | #include <TableFunctions/ITableFunctionFileLike.h> |
8 | #include <Interpreters/Context.h> |
9 | |
10 | |
11 | namespace DB |
12 | { |
13 | /* hdfs(name_node_ip:name_node_port, format, structure) - creates a temporary storage from hdfs file |
14 | * |
15 | */ |
16 | class TableFunctionHDFS : public ITableFunctionFileLike |
17 | { |
18 | public: |
19 | static constexpr auto name = "hdfs"; |
20 | std::string getName() const override |
21 | { |
22 | return name; |
23 | } |
24 | |
25 | private: |
26 | StoragePtr getStorage( |
27 | const String & source, const String & format, const ColumnsDescription & columns, Context & global_context, const std::string & table_name, const String & compression_method) const override; |
28 | }; |
29 | } |
30 | |
31 | #endif |
32 |