Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@taniabogatsch
Copy link
Contributor

The filter in https://github.com/duckdblabs/duckdb-internal/issues/5186 contains a conjunction, and the conjunction contains another conjunction with an IN filter.

Before this PR, we just propagate the values of the inner IN filter, without also comparing them to the other CONJUNCTION_AND comparisons of the outer level.

I.e., before this fix, we would look up keys 10017, 10011, 1009, and 1004, even though the outer comparisons contain <= 10011 and >=10009.

Now, we propagate inner IN filter values, and also compare them against outer IN filter values (union) and outer comparisons.

@Mytherin
Copy link
Collaborator

Thanks! Would it be possible to add a test for this as well?

@Mytherin Mytherin merged commit 66dd717 into duckdb:v1.3-ossivalis Jun 26, 2025
49 checks passed
github-actions bot pushed a commit to duckdb/duckdb-r that referenced this pull request Jun 28, 2025
github-actions bot added a commit to duckdb/duckdb-r that referenced this pull request Jun 28, 2025
Fix incorrect results in index scan (duckdb/duckdb#18058)

Co-authored-by: krlmlr <[email protected]>
@taniabogatsch taniabogatsch deleted the fix-index-scan branch July 3, 2025 06:53
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.

2 participants