mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-14 10:22:10 +00:00
495c6e03aa
* Replace all Context references with std::weak_ptr * Fix shared context captured by value * Fix build * Fix Context with named sessions * Fix copy context * Fix gcc build * Merge with master and fix build * Fix gcc-9 build
35 lines
955 B
C++
35 lines
955 B
C++
#pragma once
|
|
|
|
#include <TableFunctions/ITableFunction.h>
|
|
|
|
namespace DB
|
|
{
|
|
class Context;
|
|
|
|
/* file(path, format, structure) - creates a temporary storage from file
|
|
*
|
|
* The file must be in the clickhouse data directory.
|
|
* The relative path begins with the clickhouse data directory.
|
|
*/
|
|
class TableFunctionDictionary final : public ITableFunction
|
|
{
|
|
public:
|
|
static constexpr auto name = "dictionary";
|
|
std::string getName() const override
|
|
{
|
|
return name;
|
|
}
|
|
|
|
void parseArguments(const ASTPtr & ast_function, ContextPtr context) override;
|
|
|
|
ColumnsDescription getActualTableStructure(ContextPtr context) const override;
|
|
|
|
StoragePtr executeImpl(const ASTPtr & ast_function, ContextPtr context, const std::string & table_name, ColumnsDescription) const override;
|
|
|
|
const char * getStorageTypeName() const override { return "Dictionary"; }
|
|
|
|
private:
|
|
String dictionary_name;
|
|
ColumnsDescription dictionary_columns;
|
|
};}
|