taco-db
0.1.0
|
ExprNode
is an abstract class of all expressions.
More...
#include <expr/ExprNode.h>
Public Member Functions | |
template<class ... UniquePtrs> | |
ExprNode (NodeTag tag, UniquePtrs &&...input) | |
Base constructor for all expression nodes. More... | |
virtual | ~ExprNode () |
Deconstructor. More... | |
virtual Datum | Eval (const std::vector< NullableDatumRef > &record) const =0 |
Evaluate function upon a deserialized record. More... | |
virtual Datum | Eval (const char *record) const =0 |
Evaluate function on top of a serialized record. More... | |
std::shared_ptr< const SysTable_Type > | ReturnType () const |
Derive the return type of this expression. More... | |
![]() | |
template<class ... UniquePtrs> | |
TreeNode (NodeTag tag, UniquePtrs &&...input) | |
virtual | ~TreeNode () |
TreeNode (TreeNode &&)=default | |
TreeNode & | operator= (TreeNode &&)=default |
TreeNode (const TreeNode &)=delete | |
TreeNode & | operator= (const TreeNode &)=delete |
constexpr NodeTag | get_tag () const |
TreeNode * | get_input (size_t i) const |
template<class Node > | |
Node * | get_input_as (size_t i) const |
std::string | to_string () const |
void | node_to_string (std::string &buf, int indent) const |
Prints the node contents to a string buffer. More... | |
const char * | node_name () const |
virtual void | node_properties_to_string (std::string &buf, int indent) const =0 |
Protected Attributes | |
std::shared_ptr< const SysTable_Type > | m_type |
Additional Inherited Members | |
![]() | |
static void | append_indent (std::string &buf, int indent) |
ExprNode
is an abstract class of all expressions.
It provides the basic interface to construct, evaluate and derive return type of expressions. An expression should be evaluated upon a record, where essential schema and type information is passed through certain levels of the expression tree (e.g. Variable, Literal, Cast, etc.).
|
inline |
Base constructor for all expression nodes.
It is marked with a node tag (see include/utils/tree/node_Tags.inc for more details) and unique pointers to all of its children execution states. The unique pointers to its children will be moved to TreeNode
internal states after the construction so you don't have to remember it separately.
Note: You can use TAG(ClassName)
to get the corresponding tag for a plan execution state. For example, TAG(Literal)
will give you the tag of Literal
.
|
inlinevirtual |
Deconstructor.
|
pure virtual |
Evaluate function on top of a serialized record.
Implemented in taco::FuncCallOperator, taco::BinaryOperator, taco::Literal, taco::OrOperator, taco::UnaryOperator, taco::Variable, taco::AndOperator, and taco::Cast.
|
pure virtual |
Evaluate function upon a deserialized record.
Implemented in taco::FuncCallOperator, taco::BinaryOperator, taco::Literal, taco::OrOperator, taco::UnaryOperator, taco::Variable, taco::AndOperator, and taco::Cast.
|
inline |
Derive the return type of this expression.
|
protected |