ClickHouse/src/TableFunctions/TableFunctionDictionary.h
Ivan 495c6e03aa
Replace all Context references with std::weak_ptr (#22297)
* 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
2021-04-11 02:33:54 +03:00

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;
};}