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 (publicevaluate_*), - [
lookup] — partition/clustering lookup classification, - [
aggregation] — GROUP BY accumulator state + shared per-row update helpers, - [
stream_agg] — aggregation execution: the bufferedexecute_aggregationand the O(1) streaming-foldtry_execute_global_aggregate(issue #1578), - [
row_build] — scan-row assembly (publicbuild_row_from_scan), - [
writetime_ttl] — WRITETIME/TTL projection + injectable clock, - [
execute] — theasyncpipeline methodsexecuteandexecute_sstable_scanas animplcontinuation (issue #1174), - [
streaming] — the streaming producer task,execute_streaming_background(split out ofexecutein issue #1578), - this
mod.rs— theSelectExecutororchestration 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§
- Fixed
Clock - Test clock: always returns a fixed value.
- Partition
KeyCache - Cross-row memoization of the decoded partition-key columns (Issue #1817).
- Select
Executor - SELECT query executor for SSTable-based storage
Enums§
- Leaf
Outcome - 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
QueryRowfrom 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_scanwith a caller-ownedPartitionKeyCachethat hoists the partition-key decode across the rows of a partition (Issue #1817).- evaluate_
leaf - Evaluate a single SSTable leaf predicate against one
QueryRowwith SQL three-valued (Kleene) semantics. - evaluate_
predicates - Evaluate the SSTable predicate set against a single
QueryRow.