Crate llkv_plan

Crate llkv_plan 

Source
Expand description

Planner data structures shared between SQL parsing and execution.

The crate exposes:

  • plan_graph for the serialized DAG representation exchanged with tooling.
  • plans for high-level logical plan structures emitted by the SQL layer.
  • validation helpers that enforce naming and schema invariants while plans are being assembled.
  • conversion utilities for converting SQL AST nodes to Plan types.
  • traversal generic iterative traversal utilities for deeply nested ASTs.

Modules are re-exported so downstream crates can use llkv_plan::* when they only need a subset of the functionality.

Re-exports§

pub use canonical::canonical_scalar_from_plan_value;
pub use conversion::RangeSelectRows;
pub use conversion::extract_rows_from_range;
pub use subquery_correlation::SUBQUERY_CORRELATED_PLACEHOLDER_PREFIX;
pub use subquery_correlation::SubqueryCorrelatedColumnTracker;
pub use subquery_correlation::SubqueryCorrelatedTracker;
pub use subquery_correlation::subquery_correlated_placeholder;
pub use table_scan::TableScanProjectionSpec;
pub use table_scan::build_table_scan_plan;
pub use traversal::TransformFrame;
pub use traversal::Traversable;
pub use traversal::traverse_postorder;
pub use plan_graph::*;
pub use plans::*;

Modules§

canonical
Canonical scalar helpers for planner consumers.
conversion
Conversion utilities from SQL AST to Plan types.
plan_graph
Planner graph intermediate representation (IR).
plans
Logical query plan structures for LLKV.
subquery_correlation
Correlated subquery bookkeeping shared across SQL planning and execution.
table_scan
traversal
Generic iterative traversal utilities for AST-like structures.
validation
Shared validation utilities for plan construction.

Structs§

CanonicalRow
Canonical row representation used for hashing and equality checks.
DomainProgram
OwnedFilter
ProgramCompiler
ProgramSet

Enums§

CanonicalScalar
Canonical scalar value with stable hashing semantics.
DomainOp
EvalOp
OwnedOperator

Functions§

add_interval_to_date32
Add an interval to a Date32 value, returning the adjusted Date32 days.
normalize_predicate
parse_date32_literal
Parse a SQL DATE 'YYYY-MM-DD' literal into the Arrow Date32 encoding (days since the Unix epoch).
parse_interval_literal
subtract_interval_from_date32
Subtract an interval from a Date32 value, returning the adjusted days.

Type Aliases§

DomainProgramId