Repository navigation
feat(sql): support streaming IN subqueries - #2540
Open
pythonyx135793 wants to merge 10 commits into
Open
pythonyx135793 wants to merge 10 commits into
pythonyx135793 wants to merge 10 commits into
Conversation
This branch has not been deployed
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.
/claim #1659
Adds live
IN (SELECT ...)andNOT INpredicates toWHERE. Each inner query feeds a stateful selection processor alongside the outer stream. Changes on either side produce the matching inserts, updates and deletes; duplicate inner values are reference-counted, and duplicate outer rows keep their multiplicity.This also handles NULL/empty results, compound predicates, multiple or nested subqueries, and the planner's projections, joins, grouping/HAVING, CTEs and UNION. The existing static-IN path stays intact. Unsupported correlation, row-valued membership and unsupported relational clauses return explicit errors.
Validation on Linux, Rust 1.77.2, source
80027f3d:Validation run · Demo video
The demo shows actual engine output with its original timing.
dozer-sql/tests/DYNAMIC_IN.mdexplains the support boundaries and how to run it. Retained state is in memory; general compound predicates can require a scan of retained rows when membership changes.For the bounty payout, PayPal, Wise or USDC work for me. I can provide another compatible wallet if needed; please confirm the payment asset/network.