taco-db  0.1.0
UnaryOperator.h
Go to the documentation of this file.
1 #ifndef EXPR_UNARYOPERATOR_H
2 #define EXPR_UNARYOPERATOR_H
3 
4 #include "expr/ExprNode.h"
5 #include "expr/optypes.h"
6 
7 namespace taco {
8 
9 class UnaryOperator: public ExprNode {
10 public:
11  static std::unique_ptr<UnaryOperator>
12  Create(OpType optype, std::unique_ptr<ExprNode>&& child);
13 
14  ~UnaryOperator() override {}
15 
16  Datum Eval(const std::vector<NullableDatumRef>& record) const override;
17 
18  Datum Eval(const char* record) const override;
19 
20  void node_properties_to_string(std::string &buf, int indent) const override;
21 
22 private:
23  UnaryOperator(OpType optype, std::unique_ptr<ExprNode>&& child);
24 
27 };
28 
29 }
30 
31 #endif
taco::OpType
uint8_t OpType
The operator type, see expr/optypes.h.
Definition: tdb_base.h:288
taco::UnaryOperator::UnaryOperator
UnaryOperator(OpType optype, std::unique_ptr< ExprNode > &&child)
Definition: UnaryOperator.cpp:7
taco::UnaryOperator::m_func
FunctionInfo m_func
Definition: UnaryOperator.h:26
taco
Definition: datum.h:28
taco::UnaryOperator::Create
static std::unique_ptr< UnaryOperator > Create(OpType optype, std::unique_ptr< ExprNode > &&child)
Definition: UnaryOperator.cpp:23
taco::FunctionInfo
std::function< Datum(FunctionCallInfo &)> FunctionInfo
An FMGR managed function should be declared as.
Definition: fmgr.h:50
taco::UnaryOperator::Eval
Datum Eval(const std::vector< NullableDatumRef > &record) const override
Evaluate function upon a deserialized record.
Definition: UnaryOperator.cpp:28
taco::UnaryOperator::m_optype
OpType m_optype
Definition: UnaryOperator.h:25
taco::UnaryOperator::node_properties_to_string
void node_properties_to_string(std::string &buf, int indent) const override
Definition: UnaryOperator.cpp:38
ExprNode.h
optypes.h
taco::UnaryOperator::~UnaryOperator
~UnaryOperator() override
Definition: UnaryOperator.h:14
taco::ExprNode
ExprNode is an abstract class of all expressions.
Definition: ExprNode.h:20
taco::Datum
A Datum stores and possibly manage the memory resource of a read-only value of a plain fixed-length C...
Definition: datum.h:250
taco::UnaryOperator
Definition: UnaryOperator.h:9