Class PhysicalExecutor
java.lang.Object
com.darkcollective.relix.processor.exec.PhysicalExecutor
Executes a
PhysicalNode plan, producing a lazy Stream<Row
>.
Unlike a logical tree, the physical plan has already fixed every execution
decision: each node carries its output
Schema, and every
PhysicalNode.Join states its algorithm (hash vs nested-loop), build
side, and equi-join key columns. This executor therefore performs no cost
estimation, key extraction, or schema inference — it mechanically runs what the
Planner chose.
Streaming unary operators chain onto the input stream; operators that need random access or full buffering (sort, aggregation, the build side of a join, set operations, division) materialise as required.
Thread safety
Stateless and therefore thread-safe; the streams it returns are not.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionexecute(PhysicalNode node, ExecutionContext ctx) Executesnodeagainstctx.
-
Constructor Details
-
PhysicalExecutor
public PhysicalExecutor()
-
-
Method Details
-
execute
Executesnodeagainstctx. The stream should be consumed once and closed after use.- Parameters:
node- the physical plan to run; must not be nullctx- the shared execution context; must not be null- Returns:
- a lazy stream of result rows
-