feat: add scalable SQL execution paths - #70
Open
HelgeSverre wants to merge 2 commits into
Open
Conversation
HelgeSverre
marked this pull request as ready for review
August 9, 2026 17:54
This was referenced Aug 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
EXISTS, selective indexed joins, spill-backedDISTINCT, incremental window aggregation, bulk loading, and populated-tableADD PRIMARY KEY2^53and avoid floating-point prefix cancellationDISTINCTbyte-bounded, spill-capable, cancellation-aware, and safe for async runtime workersReview follow-up
The adversarial review identified correctness and resource-safety gaps in the original implementation. This update adds regression coverage and fixes for:
f64prefix subtraction in windowSUM/AVGALTER TABLE ... ADD PRIMARY KEYImplicit ALTER transactions now skip unnecessary per-key checkpoint logging because the entire private transaction can be discarded on failure. Explicit user transactions retain checkpoints and statement rollback semantics.
Performance
Release builds on the same Apple Silicon host, identical schemas/data, alternating execution order, five warmups, and 20-100 measured samples. Values are median client-observed latency.
Review fixes: before vs after
The floating-window regression test initially exposed a 3.66 ms to 2,378 ms slowdown from frame rescanning. A range-sum tree restored bounded evaluation; the final 3.67 ms result retains exact singleton-frame behavior.
ElyraSQL vs MySQL 8.0.33
Profiling shows the remaining
ADD PRIMARY KEYgap is dominated by atomic redb validation and individual key removal/insertion. A storage-level atomic bulk/range-rewrite primitive is intentionally deferred to a follow-up PR.Verification
cargo test --workspace --all-targets— 407 tests passedcargo clippy --workspace --all-targets -- -D warningscargo fmt --all -- --checkgit diff --check