java.lang.Object
com.darkcollective.relix.processor.exec.PhysicalExecutor

public final class PhysicalExecutor extends Object
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 Details

    • PhysicalExecutor

      public PhysicalExecutor()
  • Method Details

    • execute

      public Stream<Row> execute(PhysicalNode node, ExecutionContext ctx)
      Executes node against ctx. The stream should be consumed once and closed after use.
      Parameters:
      node - the physical plan to run; must not be null
      ctx - the shared execution context; must not be null
      Returns:
      a lazy stream of result rows