llkv-executor 0.8.1-alpha

Query execution engine for the LLKV toolkit.
Documentation

LLKV Executor

made-with-rust rust-docs CodSpeed Badge Ask DeepWiki

Work in Progress

llkv-executor evaluates SELECT plans for the LLKV stack. It produces streaming Arrow RecordBatches, coordinating with table scans, joins, and aggregation primitives while remaining oblivious to transaction orchestration.

Responsibilities

  • Execute logical SelectPlans emitted by llkv-plan and dispatched by llkv-runtime.
  • Stream RecordBatch results through callbacks so callers can consume output incrementally.
  • Evaluate projection, filtering, scalar expressions, aggregation, and join operations over Arrow arrays.
  • Integrate with the table layer for predicate pushdown and efficient column gathering.

Execution Pipeline

  • TableExecutor builds a RowStreamBuilder, fetching projected columns via llkv-table and combining them with computed expressions.
  • Filter evaluation uses vectorized expression kernels to avoid per-row branching; scalar subqueries bind correlated values supplied by the planner.
  • Aggregations delegate to llkv-aggregate for grouped and streaming operations.
  • Joins rely on llkv-join implementations such as hash joins optimized for primitive key pairs.
  • Results are emitted as soon as a batch is available, preventing full result materialization.

Interaction with the Runtime

  • Invoked exclusively by llkv-runtime, which provides transaction context and MVCC-filtered row streams.
  • Receives already-validated plans; error handling focuses on execution-time failures (e.g., overflow, unsupported expression forms).
  • Remains agnostic to DDL/DML responsibilities so it can focus on efficient batch processing.

License

Licensed under the Apache-2.0 License.