9#include <unordered_set>
67 enum class Kind { Var, Const };
72 static PathArg Var(std::string attr) {
73 return {Kind::Var, std::move(attr)};
75 static PathArg Const(std::string val) {
76 return {Kind::Const, std::move(val)};
81 FOL_OPERATION_SCAN = 1,
84 FOL_OPERATION_PROJECT,
85 FOL_OPERATION_MATERIALIZE,
142 std::optional<Tuple> project_buffer;
157 std::optional<Tuple> join_buffer;
158 std::unordered_set<std::string> join_attrs;
168 std::size_t mat_pos = 0;
169 bool mat_done =
false;
173 std::unordered_map<std::string, std::string> attrs;
177 std::vector<PlanNode*>::iterator current_node;
215 static std::vector<std::string> ResolveArgs(
const std::vector<PathArg>& tmpl,
Tuple* from);
Defines symbol visibility for the Relational NT public API.
Declares paging and cursor orchestration for query execution.
Shared enum types and core data types used by the runtime.
Orchestrates paginated data retrieval from a storage backend.
Definition CursorManager.h:36
A single row of data streamed lazily from the cursor layer.
Definition Types.h:136
Tuple * Next(PlanNode *node)
Pulls the next tuple from the plan tree (Tarski/FOL core).
Definition VM.cpp:88
Contains the Relational NT runtime managers and API facade.
Active scan state for a single relation.
Definition CursorManager.h:74
One segment of a parameterized relation path in a SCAN node.
Definition VM.h:66
std::string name
Attribute name to look up (Var), or literal value (Const).
Definition VM.h:70
A node in the Volcano operator tree executed by the Tarski (FOL) runtime.
Definition VM.h:116
std::vector< PlanNode * > nodes
UNION runtime state.
Definition VM.h:176
Tuple * join_left
JOIN runtime state.
Definition VM.h:156
CursorManager::cursor * scan_cursor
SCAN: pre-opened cursor.
Definition VM.h:126
std::vector< PathArg > scan_args
SCAN: argument template for parameterized relations.
Definition VM.h:134
std::size_t take_limit
TAKE: maximum number of tuples to emit before returning nullptr.
Definition VM.h:137
std::size_t take_count
Runtime counter; mutable during execution.
Definition VM.h:138
std::vector< Tuple > mat_buffer
MATERIALIZE runtime state.
Definition VM.h:167
std::unordered_set< std::string > project_attrs
PROJECT: unordered set of attribute names to keep.
Definition VM.h:141
PlanNode * upstream
RENAME runtime state.
Definition VM.h:172