ClickHouse/src/TableFunctions/TableFunctionDictionary.h

33 lines
881 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, bool is_insert_query) const override;
2021-03-19 12:47:27 +00:00
StoragePtr executeImpl(const ASTPtr & ast_function, ContextPtr context, const std::string & table_name, ColumnsDescription, bool is_insert_query) const override;
2021-03-19 12:47:27 +00:00
const char * getStorageTypeName() const override { return "Dictionary"; }
private:
String dictionary_name;
ColumnsDescription dictionary_columns;
2023-11-06 03:33:23 +00:00
};
}