taco-db  0.1.0
BinaryOperator.h
Go to the documentation of this file.
1 #ifndef EXPR_BINARYOPERATOR_H
2 #define EXPR_BINARYOPERATOR_H
3 
4 #include "expr/ExprNode.h"
5 #include "expr/optypes.h"
6 
7 namespace taco {
8 
9 class BinaryOperator: public ExprNode {
10 public:
11  static std::unique_ptr<BinaryOperator>
12  Create(OpType optype,
13  std::unique_ptr<ExprNode>&& left,
14  std::unique_ptr<ExprNode>&& right);
15 
16  ~BinaryOperator() override {}
17 
18  Datum Eval(const std::vector<NullableDatumRef>& record) const override;
19 
20  Datum Eval(const char* record) const override;
21 
22  void node_properties_to_string(std::string &buf, int indent) const override;
23 private:
24  BinaryOperator(OpType optype,
25  std::unique_ptr<ExprNode>&& left,
26  std::unique_ptr<ExprNode>&& right);
27 
28  // TODO implement me
29 };
30 
31 }
32 
33 #endif
Definition: BinaryOperator.h:9
void node_properties_to_string(std::string &buf, int indent) const override
Definition: BinaryOperator.cpp:36
BinaryOperator(OpType optype, std::unique_ptr< ExprNode > &&left, std::unique_ptr< ExprNode > &&right)
Definition: BinaryOperator.cpp:7
Datum Eval(const std::vector< NullableDatumRef > &record) const override
Evaluate function upon a deserialized record.
Definition: BinaryOperator.cpp:24
~BinaryOperator() override
Definition: BinaryOperator.h:16
static std::unique_ptr< BinaryOperator > Create(OpType optype, std::unique_ptr< ExprNode > &&left, std::unique_ptr< ExprNode > &&right)
Definition: BinaryOperator.cpp:16
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: datum.h:28
uint8_t OpType
The operator type, see expr/optypes.h.
Definition: tdb_base.h:287