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
A Datum stores and possibly manage the memory resource of a read-only value of a plain fixed-length C...
Definition: datum.h:250
ExprNode is an abstract class of all expressions.
Definition: ExprNode.h:29
Definition: UnaryOperator.h:9
static std::unique_ptr< UnaryOperator > Create(OpType optype, std::unique_ptr< ExprNode > &&child)
Definition: UnaryOperator.cpp:23
~UnaryOperator() override
Definition: UnaryOperator.h:14
Datum Eval(const std::vector< NullableDatumRef > &record) const override
Evaluate function upon a deserialized record.
Definition: UnaryOperator.cpp:28
OpType m_optype
Definition: UnaryOperator.h:25
FunctionInfo m_func
Definition: UnaryOperator.h:26
UnaryOperator(OpType optype, std::unique_ptr< ExprNode > &&child)
Definition: UnaryOperator.cpp:7
void node_properties_to_string(std::string &buf, int indent) const override
Definition: UnaryOperator.cpp:38
Definition: datum.h:28
uint8_t OpType
The operator type, see expr/optypes.h.
Definition: tdb_base.h:287
std::function< Datum(FunctionCallInfo &)> FunctionInfo
An FMGR managed function should be declared as.
Definition: fmgr.h:50