ClickHouse/src/TableFunctions/TableFunctionDictionary.h

31 lines
835 B
C++
Raw Normal View History

2021-03-19 12:47:27 +00:00
#pragma once
#include <TableFunctions/ITableFunction.h>
namespace DB
{
class Context;
2021-10-04 18:09:32 +00:00
/// dictionary(dictionary_name) - creates a temporary storage from dictionary
2021-03-19 12:47:27 +00:00
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;
2021-03-19 12:47:27 +00:00
ColumnsDescription getActualTableStructure(ContextPtr context) const override;
2021-03-19 12:47:27 +00:00
StoragePtr executeImpl(const ASTPtr & ast_function, ContextPtr context, const std::string & table_name, ColumnsDescription) const override;
2021-03-19 12:47:27 +00:00
const char * getStorageTypeName() const override { return "Dictionary"; }
private:
String dictionary_name;
ColumnsDescription dictionary_columns;
};}