Repository navigation
Conversation
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.
Why
DuckDB 2.0 keeps some optimized one-sided outer joins as RIGHT joins. The regular N-term compiler accepted INNER and LEFT joins but rejected RIGHT, so Spark's
gold.fact_market_historyfell back to a 15-term inclusion-exclusion program during SF100 batch 2.Change
Accept RIGHT joins in the same one-sided outer-join path as LEFT joins. The existing term builder and NULL-transition handling already orient themselves by the null-supplying side; no new delta rule is needed.
Evidence
fact_market_historycompile shrinks from 112,470 to 43,301 SQL bytes, with 14 to 9UNION ALLoccurrences while preserving the RIGHT join.EXCEPT ALLequality after a mixed INSERT/DELETE/UPDATE batch.test/sql/left_join_regular_nterm.test: 60 assertions pass.test/integration/test_regular_nterm_compiled.py: passes.This PR is stacked on #147 because the benchmark currently pins its head. It does not change DuckLake row-ID upsert logic.