fix(sql): use comparison coercion for IN lists - #2512
Open
Th0masclassic wants to merge 2 commits into
Open
Th0masclassic wants to merge 2 commits into
Th0masclassic wants to merge 2 commits into
Conversation
Th0masclassic
marked this pull request as ready for review
September 8, 2026 21:21
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
Summary
Fix a remaining static
IN (...)semantic gap from #1659: compatible values that Dozer's normal equality operator coerces were compared as rawFieldvariants insideINlists.For example, current main evaluates
42 = 42.0astrueusing SQL comparison coercion, while42 IN (42.0)evaluates tofalse.This patch reuses the existing equality evaluator for non-null list comparisons so
INandNOT INare consistent with Dozer's normal equality semantics.This is intentionally scoped separately from the NULL-semantics work in #2494 and from the
IN (SELECT ...)implementations. Existing NULL behavior is preserved.Changes
evaluate_eqfor compatible non-nullINlist items.42 IN (42.0).42 NOT IN (42.0).Demo
Short demo video: https://github.com/Th0masclassic/dozer/releases/download/dozer-1659-in-coercion-demo/demo.mp4
The demo shows the upstream semantic mismatch, the patched behavior, and the validation results.
Validation
INexpression tests pass locally: 3 passed, 0 failed.rustfmt --checkpasses for the modified Rust files.git diff --checkpasses.AI-assisted development disclosure: ChatGPT was used to assist with investigation and implementation; the resulting changes and regression coverage were reviewed and validated before submission.