Skip to main content

Module select_executor

Module select_executor 

Source
Expand description

CQL SELECT Query Executor for Direct SSTable Access

This module implements the REVOLUTIONARY query executor that can run CQL SELECT statements directly on SSTable files without Cassandra.

Features:

  • Direct SSTable file scanning with predicate pushdown
  • Streaming results for memory efficiency
  • Parallel execution across multiple SSTable files
  • Advanced aggregation with hash-based grouping
  • Collection operations (list[index], map[‘key’])

§Module layout

The executor is split by responsibility (epic #1116):

  • [value_ops] — value comparison + arithmetic primitives,
  • [predicate] — SSTable leaf-predicate evaluation (public evaluate_*),
  • [lookup] — partition/clustering lookup classification,
  • [aggregation] — GROUP BY accumulator state + shared per-row update helpers,
  • [stream_agg] — aggregation execution: the buffered execute_aggregation and the O(1) streaming-fold try_execute_global_aggregate (issue #1578),
  • [row_build] — scan-row assembly (public build_row_from_scan),
  • [writetime_ttl] — WRITETIME/TTL projection + injectable clock,
  • [execute] — the async pipeline methods execute and execute_sstable_scan as an impl continuation (issue #1174),
  • [streaming] — the streaming producer task, execute_streaming_background (split out of execute in issue #1578),
  • this mod.rs — the SelectExecutor orchestration and remaining per-step helpers.

§Lint policy (issue #1590, E8)

The read-path pipeline step helpers below are pure/synchronous — none awaits. Deny clippy::unused_async for this module (and its submodules) so a future edit cannot silently reintroduce the future/state-machine overhead of an async fn that never awaits (which also infects every caller with an .await). A crate-level deny is deliberately NOT used: cqlite-core still has many legitimately-flagged async fns on its public surface (out of E8’s scope), so the guard is scoped to the pipeline it protects.

Structs§

FixedClock
Test clock: always returns a fixed value.
PartitionKeyCache
Cross-row memoization of the decoded partition-key columns (Issue #1817).
SelectExecutor
SELECT query executor for SSTable-based storage

Enums§

LeafOutcome
Three-valued (SQL Kleene) outcome of evaluating a single leaf predicate against one row.

Traits§

NowSeconds
Clock abstraction for TTL “now” injection.

Functions§

build_row_from_scan
Build a QueryRow from a single (RowKey, ScanRow) produced by storage scan, applying optional projection and synthesising partition-key columns from the raw key bytes when a schema is available.
build_row_from_scan_cached
build_row_from_scan with a caller-owned PartitionKeyCache that hoists the partition-key decode across the rows of a partition (Issue #1817).
evaluate_leaf
Evaluate a single SSTable leaf predicate against one QueryRow with SQL three-valued (Kleene) semantics.
evaluate_predicates
Evaluate the SSTable predicate set against a single QueryRow.