Repository navigation
fix: preserve lambda bindings across projection pushdown - #2413
Conversation
|
Warning The baseline was not found. Spark 3.5.9 Test ReportCommit Information
Test Summary
Test DetailsError CountsPassed Tests Diff(empty) Failed Tests |
Spark 4.2.0 Test ReportCommit Information
Test Summary
Test DetailsError Counts(truncated) Passed Tests Diff(empty) Failed Tests(truncated) |
Ibis Test ReportCommit Information
Test Summary
Test DetailsError CountsPassed Tests Diff--- before.txt 2026-08-11 10:21:24.064244359 +0000
+++ after.txt 2026-08-11 10:21:24.256244405 +0000
@@ -533 +532,0 @@
-ibis/backends/tests/test_export.py::test_table_to_csv[pyspark]
@@ -758,0 +758 @@
+ibis/backends/tests/test_generic.py::test_uncorrelated_subquery[pyspark]Failed Tests |
Codecov Report❌ Patch coverage is
@@ Coverage Diff @@
## main #2413 +/- ##
==========================================
- Coverage 78.28% 78.27% -0.02%
==========================================
Files 959 960 +1
Lines 191687 191827 +140
==========================================
+ Hits 150065 150155 +90
- Misses 41622 41672 +50
*This pull request uses carry forward flags. Click here to find out more.
... and 2 files with indirect coverage changes 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Adds lambda-safe projection pushdown to preserve physical bindings across schema rewrites.
Changes:
- Wraps DataFusion projection pushdown with temporary optimizer boundaries.
- Protects lambda projections and nested-loop join filters.
- Adds self-join and captured-column regression coverage.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
crates/sail-physical-optimizer/src/projection_pushdown.rs |
Implements lambda-safe projection pushdown. |
crates/sail-physical-optimizer/src/lib.rs |
Registers the new optimizer rule. |
python/pysail/tests/spark/dataframe/test_higher_order_self_join.py |
Adds self-join and join-filter regressions. |
python/pysail/tests/spark/function/features/array/array_filter.feature |
Re-enables captured-column join coverage. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
linhr
left a comment
There was a problem hiding this comment.
This workaround makes sense to me!
Would you like to create an issue with a minimum reproducible example (such as a unit test) so that the DataFusion community is aware of the root cause?
Gold Data ReportNotes
Commit Information
Summary
DetailsGold Data Metrics
|
|
@linhr Thanks for the review! I'll create an issue with an MRE upstream. |
|
Upstream issue created apache/datafusion#24372 |
Summary
Preserve physical lambda-variable bindings when DataFusion projection pushdown rewrites higher-order expressions across schema boundaries.
Temporary optimizer boundaries protect lambda-bearing projections from unsafe projection unification and protect lambda-bearing nested-loop join filters from join-filter extraction, while ordinary child projections remain eligible for optimization. All boundaries are removed before the optimized plan is returned. This addresses both higher-order self-join expressions and lambdas that capture columns across join sides.
Closes #2395