Skip to content

Conversation

lnkuiper
Copy link
Contributor

@lnkuiper lnkuiper commented Jun 30, 2025

I was looking into https://github.com/duckdblabs/duckdb-internal/issues/5049 and tried converting some of our MARK joins to SEMI joins. This didn't fix the issue I was looking at (and regressed the IMDB benchmark, so I reverted it), but it uncovered a bug in the dynamic index scan (which I accidentally introduced in #17297). This PR cleans up the recursion through the nested AND filters and simplifies the logic so it's a lot less error-prone.

I have tried, but can't seem to reproduce it without changing the MARK to SEMI. However, I still think the changes here are important as they fix a bug with complex filters that can trigger an index scan.

@lnkuiper lnkuiper changed the base branch from main to v1.3-ossivalis July 1, 2025 09:09
@lnkuiper lnkuiper changed the title Convert MARK join to SEMI in InClauseRewriter Refactor extracting expressions for dynamic index scans Jul 1, 2025
@lnkuiper lnkuiper marked this pull request as draft July 1, 2025 13:40
@lnkuiper lnkuiper marked this pull request as ready for review July 1, 2025 13:40
@Mytherin Mytherin merged commit f590339 into duckdb:v1.3-ossivalis Jul 2, 2025
50 checks passed
@Mytherin
Copy link
Collaborator

Mytherin commented Jul 2, 2025

Thanks!

@lnkuiper lnkuiper deleted the in_clause_semi branch July 8, 2025 08:25
krlmlr added a commit to krlmlr/duckdb-r that referenced this pull request Jul 9, 2025
Refactor extracting expressions for dynamic index scans (duckdb/duckdb#18095)
Cleanup on correct branch (1.3-ossivalis) instead of v1.2-histrionicus (duckdb/duckdb#18111)
krlmlr added a commit to krlmlr/duckdb-r that referenced this pull request Jul 9, 2025
Refactor extracting expressions for dynamic index scans (duckdb/duckdb#18095)
Cleanup on correct branch (1.3-ossivalis) instead of v1.2-histrionicus (duckdb/duckdb#18111)
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