ClickHouse/src/TableFunctions/TableFunctionValues.h

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

31 lines
1008 B
C++
Raw Normal View History

2019-07-29 13:50:13 +00:00
#pragma once
#include <TableFunctions/ITableFunction.h>
namespace DB
{
2019-07-31 14:12:05 +00:00
/* values(structure, values...) - creates a temporary storage filling columns with values
2022-02-28 00:15:37 +00:00
* values is case-insensitive table function.
2019-07-31 14:12:05 +00:00
*/
2019-07-29 13:50:13 +00:00
class TableFunctionValues : public ITableFunction
{
public:
static constexpr auto name = "values";
std::string getName() const override { return name; }
bool hasStaticStructure() const override { return true; }
2019-07-29 13:50:13 +00:00
private:
StoragePtr executeImpl(const ASTPtr & ast_function, ContextPtr context, const std::string & table_name, ColumnsDescription cached_columns) const override;
const char * getStorageTypeName() const override { return "Values"; }
ColumnsDescription getActualTableStructure(ContextPtr context) const override;
void parseArguments(const ASTPtr & ast_function, ContextPtr context) override;
2022-02-07 15:28:24 +00:00
static DataTypes getTypesFromArgument(const ASTPtr & arg, ContextPtr context);
2022-01-26 13:31:09 +00:00
ColumnsDescription structure;
bool has_structure_in_arguments;
2019-07-29 13:50:13 +00:00
};
}