Repository navigation
fix: preserve lambda bindings in nested-loop join projection pushdown - #26399
Merged
xudong963 merged 2 commits intoOct 19, 2026
Merged
Conversation
Keep lambda bodies within their high-order functions while retaining single-input expression pushdown. Rebase lambda parameters as expressions move between input projections and join filter schemas, with SQL result and plan regressions. Generated-by: OpenAI Codex
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #26399 +/- ##
=======================================
Coverage 82.89% 82.89%
=======================================
Files 1154 1154
Lines 458022 458058 +36
Branches 458022 458058 +36
=======================================
+ Hits 379683 379720 +37
+ Misses 55303 55298 -5
- Partials 23036 23040 +4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
|
I think this issue is related. #24372 |
jayzhan211
approved these changes
Oct 18, 2026
jayzhan211
left a comment
Contributor
There was a problem hiding this comment.
Thanks @xudong963 , LGTM!
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Oct 19, 2026
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.
Which issue does this PR close?
Rationale for this change
A nested-loop join whose lambda captures a column from the other input can fail during physical optimization with
unable to unwrap lambda, even though the query executes correctly with physical optimization disabled.These queries should work with the default optimizer while retaining projection pushdown for expressions that can be evaluated on one join input.
What changes are included in this PR?
nested_loop_join_lambda.sltwith result and physical-plan regressions.This change preserves lambda bodies within their enclosing function; it does not introduce hoisting of individual computations from inside a lambda body.
What is the testing strategy for this PR?
The new SQL test covers the original reproducer with either join-input order, mixed predicates, nested lambdas, parameter shadowing, empty/NULL arrays, and extraction of complete high-order functions onto either input. Different input and filter schema widths exercise parameter rebasing. Three
EXPLAINchecks verify that ordinary expressions and complete high-order functions are still pushed down.Are there any user-facing changes?
Nested-loop joins with lambda predicates now plan and execute with the default physical optimizer. There are no public API or configuration changes.