ClickHouse/dbms/include/DB/Columns/ColumnExpression.h

41 lines
1.1 KiB
C++
Raw Normal View History

#pragma once
2016-01-13 00:32:59 +00:00
#include <DB/Core/NamesAndTypes.h>
#include <DB/Columns/IColumnDummy.h>
namespace DB
{
2016-01-13 00:32:59 +00:00
class ExpressionActions;
2017-03-09 00:56:38 +00:00
/** A column containing a lambda expression.
* Behaves like a constant-column. Contains an expression, but not input or output data.
*/
class ColumnExpression final : public IColumnDummy
{
2016-01-13 00:32:59 +00:00
private:
using ExpressionActionsPtr = std::shared_ptr<ExpressionActions>;
2016-01-13 00:32:59 +00:00
public:
ColumnExpression(size_t s_, ExpressionActionsPtr expression_, const NamesAndTypes & arguments_, DataTypePtr return_type_, String return_name_);
ColumnExpression(size_t s_, ExpressionActionsPtr expression_, const NamesAndTypesList & arguments_, DataTypePtr return_type_, String return_name_);
2016-01-13 00:32:59 +00:00
std::string getName() const override;
ColumnPtr cloneDummy(size_t s_) const override;
2016-01-13 00:32:59 +00:00
const ExpressionActionsPtr & getExpression() const;
const DataTypePtr & getReturnType() const;
const std::string & getReturnName() const;
const NamesAndTypes & getArguments() const;
Names getArgumentNames() const;
private:
ExpressionActionsPtr expression;
NamesAndTypes arguments;
DataTypePtr return_type;
std::string return_name;
};
}