1 #ifndef EXECUTION_PLANEXECSTATE_H
2 #define EXECUTION_PLANEXECSTATE_H
35 template<
class ...UniquePtrs>
99 LOG(
kFatal,
"save_position() not supported by %s",
129 LOG(
kFatal,
"rewind(saved_position) not supported by %s",
145 return get_input_as<PlanExecState>(i);
A DatumRef object is a read-only reference to an C++ object of a supported runtime type.
Definition: datum.h:823
A Datum stores and possibly manage the memory resource of a read-only value of a plain fixed-length C...
Definition: datum.h:250
static Datum FromNull()
Definition: datum.h:343
PlanExecState is an abstract interface for execution state of various query plan.
Definition: PlanExecState.h:19
virtual bool rewind(DatumRef saved_position)
Rewinds the execution state to the same as the one that was previously saved and returns if the rewin...
Definition: PlanExecState.h:128
PlanExecState(NodeTag tag, UniquePtrs &&...input)
Base constructor for all execution states.
Definition: PlanExecState.h:36
virtual ~PlanExecState()
Deconstructor of PlanExecState.
Definition: PlanExecState.h:45
virtual void rewind()=0
Rewind the execution state as if it has just been initialized.
virtual Datum save_position() const
Returns a saved position where this plan execution state is at.
Definition: PlanExecState.h:98
virtual std::vector< NullableDatumRef > get_record()=0
Return the deserialized output record to which this execution state currently points.
virtual const PlanNode * get_plan() const =0
Returns the corresponding plan.
PlanExecState * get_child(size_t i) const
Utility function to get the raw pointer of i-th child of this execution state.
Definition: PlanExecState.h:144
virtual void close()=0
Clear internal states, mark we have finish retrieving output records from this execution state,...
virtual void init()=0
Initialize this plan execution state, set m_initialized to true and initialize all corresponding stat...
bool m_initialized
Definition: PlanExecState.h:148
virtual bool next_tuple()=0
Moves the iterator of this execution state to the next output record.
PlanNode is an abstract interface representing physical query plan that does not bound with any parti...
Definition: PlanNode.h:26
TreeNode is the base class of all tree structures in TDB (e.g., parsing tree, logical plan,...
Definition: TreeNode.h:40
constexpr NodeTag get_tag() const
Definition: TreeNode.h:60
#define LOG(level,...)
LOG(LogSeverity level, const char *fmt, ...)
Definition: logging.h:116
constexpr LogSeverity kFatal
Definition: logging.h:22
NodeTag
Definition: NodeTag.h:12
const char * node_tag_name(NodeTag tag)
Returns the class name of the tag's class.
Definition: NodeTag.cpp:78