Skip to content

feat(sql): support streaming IN / NOT IN subquery and mixed-type IN list evaluation - #2531

Open
open5588 wants to merge 1 commit into
getdozer:mainfrom
open5588:feat/issue-1659-streaming-sql-in-clause
Open

open5588 wants to merge 1 commit into
getdozer:mainfrom
open5588:feat/issue-1659-streaming-sql-in-clause

Conversation

@open5588

Copy link
Copy Markdown

/claim #1659

Summary

Extends Dozer streaming SQL IN / NOT IN support for both static value lists and dynamic IN (SELECT ...) subqueries (#1659).

Changes

  1. Static IN (...) / NOT IN (...) list evaluation (dozer-sql/expression/src/in_list.rs):
    • Evaluates the left-hand expression once per record and uses evaluate_eq for consistent SQL equality and numeric type coercion across IN list items.
  2. Dynamic IN (SELECT ...) / NOT IN (SELECT ...) streaming processor (dozer-sql/src/selection/in_subquery.rs, dozer-sql/src/builder/mod.rs):
    • Adds InSubqueryProcessorFactory and InSubqueryProcessor, a two-port streaming processor that maintains outer-table records and reference-counted inner-subquery keys.
    • Emits downstream Insert / Delete / Update transitions when either the outer table or inner subquery stream receives Insert, Delete, Update, or BatchInsert operations.
    • Supports IN (SELECT ...) and NOT IN (SELECT ...) both standalone and combined with AND predicates in WHERE clauses.
  3. Tests:
    • Unit and DAG builder tests covering InSubqueryProcessor streaming transitions (Insert, Delete, Update, duplicate subquery keys, NOT IN visibility inversion), pipeline construction, and mixed-type IN list evaluation.

Fixes #1659

@open5588
open5588 force-pushed the feat/issue-1659-streaming-sql-in-clause branch from 6657d86 to 3f5d343 Compare October 15, 2026 12:04

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.

Support for IN clause in streaming SQL

1 participant