Skip to content

feat(sql): support streaming IN subquery membership - #2537

Draft
1932819331hy-debug wants to merge 7 commits into
getdozer:mainfrom
1932819331hy-debug:fix/streaming-in-subqueries-1659
Draft

1932819331hy-debug wants to merge 7 commits into
getdozer:mainfrom
1932819331hy-debug:fix/streaming-in-subqueries-1659

Conversation

@1932819331hy-debug

@1932819331hy-debug 1932819331hy-debug commented Oct 22, 2026 •

Copy link
Copy Markdown

Summary

Implements the dynamic subquery portion of #1659: uncorrelated streaming WHERE ... IN (SELECT ...) and NOT IN, including boolean combinations and multiple membership inputs.

Draft: not ready to merge. The current all-features CI gets past the original time compiler blocker, then fails on 30 generated-code lint diagnostics in dozer-types; formatting and Cargo Deny have not run to completion. No check was weakened, and this PR makes no bounty/payment claim.

Behavior

  • Retains outer occurrences and inner multiplicities, including duplicates and NULL; inner inserts/retractions update already-retained outer rows.
  • Handles outer/inner inserts, deletes, updates and batches, preserving output columns and appropriate operation deltas.
  • Retains emitted visibility for event-driven volatile expressions. Clock passage alone does not generate updates.
  • Preserves lexical CTE scope and legitimate relation qualifiers; rejects unsupported correlation rather than silently binding the wrong column.

Limits: in-memory state without new checkpoint recovery/eviction; right changes scan retained outer rows and clone state. Membership inputs require one compatible typed column, with the documented NULL exception. TTL/window/lifetime inputs and unsupported scalar-embedded forms are rejected. See dozer-sql/STREAMING_IN.md.

Exact validation

Current HEAD: 5075a022ac8d6e2e15119fe2994f93ec438be189
Current tree: 54ff00852e816ed290be76075ea097e0ccc50304

The passing affected-package results below are historical evidence for the feature commit and its original dependency graph, not a rerun of the current compatibility graph.

Feature commit: b407582b17f8fc9625735eb7483a6d9a33829769
Tree: 77facdd1933ce97219310311f6bf0490f75a4d07

Clean default affected-package suites: core 43 passed, SQL 247 passed / 1 pre-existing ignored, expression 30 passed. Doc-test targets contained zero tests. The ignored test_wrong_nested_aggregations was not run.

Tests include actual DAG construction/source wiring and actual processor event outputs, with 49 independently generated SQLite snapshot expectations. They are not a full asynchronous external-source replay.

Separate bounded review reproduced and drove fixes for volatile visibility, Dynamic source qualifiers, nested CTE shadowing and CTE result binding. Its two additional controls passed (SQL 249 + the same ignored test), checking full schema/key/nullability and unchanged operation forwarding; these review-only tests are separate from the frozen commit.

CI status and compatibility changes

Historical baseline comparison

Both original Dozer CI runs failed in Clippy with Rust 1.99.1, compiling locked time 0.3.34: E0282 at format_description/parse/mod.rs:83 (Box<_> inference). Cargo.lock, Cargo.toml and the workflow were byte-identical between those two historical inputs.

Current compatibility candidate

The compatibility follow-up commits leave the SQL implementation unchanged:

  • 30fce125: normal Cargo-generated precise update to time 0.3.47 and its resolved dependency closure. The lock delta changes eight package versions and adds serde_core and a parallel syn 3 entry; 925 other package entries retain their versions, checksums and dependency lists. Cargo also emits lock format 4 and normalizes two Git branch URL encodings without changing their pinned commits. This is a bounded compatibility resolution, not a claim that no smaller valid dependency graph exists.
  • 8f228d83: supplies the existing Cargo Deny action's supported rust-version: "1.99.1" input, aligning its separate container toolchain with the Rust version observed in the original runner. The action version, checks, commands, deny.toml, triggers and permissions are unchanged.
  • f5f26dc: fixes 19 tracked-source diagnostics in five dozer-types files: attribute spacing, unused imports, redundant lifetimes/default matches/return, and an explicit elided Cow lifetime. Rustfmt also corrects the two previously documented GAT wraps in that same source slice. No lint suppression is added.
  • 5075a02: updates only async-trait 0.1.78 -> 0.1.92 using normal Cargo resolution. Its upstream fix removes a redundant generated must_use attribute while preserving unused-Future diagnostics. The other 936 locked package entries are unchanged from 8f228d83.

First compatibility CI, exact 8f228d83 passed the previous time E0282 point, then failed on 79 diagnostics: 19 in tracked source files byte-identical to the base, and 60 in generated protobuf code.

Current original Dozer CI, exact 5075a02 completed with failure. It compiled async-trait 0.1.92, checked time 0.3.47, and confirms that the 49 targeted source/macro diagnostics are gone. Clippy exited 101 with the remaining 30 generated result_large_err diagnostics, all involving the existing tonic::Status type. No other diagnostic category appeared before this stopping point; this does not establish that the rest of workspace/all-features Clippy passes.

The subsequent fmt and Cargo Deny steps were skipped. The supported deny-container input and full advisory/license checks remain runtime-unverified. Changed-file rustfmt and four bounded std-only source controls passed locally; those controls compare extracted conversion/default/name logic and illustrate the explicit lifetime, rather than running the full package or generated-code suites. The historical affected-package suites above have not been rerun on this dependency graph. No tonic migration, warning suppression, service-backed coverage, performance or persistence/restart test is included.

Reproducible demonstration

Demo video, transcript and replayable patches · Direct MP4 download

The video replays a genuine local synthetic Rust-test transcript, including the historical baseline failure and 13 incremental processor assertions. It is not a live-database screen recording. Supporting test-only patches and the transcript are supplied on a separate documentation branch without adding demonstration artifacts to this PR branch.

Authorship and CLA

This is AI-assisted work. The three original commits retain their Codex <codex@openai.com> author/committer metadata; it has not been rewritten to imply a personal signature. The submitting user reports accepting the linked Dozer CLA on the official site. The CLA bot's association with these actual committers is still to be verified; no green bot status is claimed.

The repository CONTRIBUTING.md was checked. Its linked detailed contribution guide returned HTTP404 during preparation, so additional requirements there could not be verified.

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants