forked from ClickHouse/ClickHouse
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDataTypeFunction.h
42 lines (31 loc) · 1.01 KB
/
DataTypeFunction.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#pragma once
#include <DataTypes/IDataTypeDummy.h>
namespace DB
{
/** Special data type, representing lambda expression.
*/
class DataTypeFunction final : public IDataTypeDummy
{
private:
DataTypes argument_types;
DataTypePtr return_type;
public:
static constexpr bool is_parametric = true;
bool isParametric() const override { return true; }
/// Some types could be still unknown.
explicit DataTypeFunction(const DataTypes & argument_types_ = DataTypes(), const DataTypePtr & return_type_ = nullptr)
: argument_types(argument_types_), return_type(return_type_) {}
std::string doGetName() const override;
const char * getFamilyName() const override { return "Function"; }
TypeIndex getTypeId() const override { return TypeIndex::Function; }
const DataTypes & getArgumentTypes() const
{
return argument_types;
}
const DataTypePtr & getReturnType() const
{
return return_type;
}
bool equals(const IDataType & rhs) const override;
};
}