Commit c265f1d
committed
[SPARK-57512][SQL] Unfold surviving RuntimeReplaceable at predicate-pushdown boundaries
Generalize the cached-batch fix: a surviving RuntimeReplaceable must be unfolded to
its replacement wherever a predicate leaves Spark's expression-evaluation engine for
a structure-interpreting consumer. In addition to CachedBatchSerializer.buildFilter,
this covers data source filter pushdown -- V1 DataSourceStrategy.translateLeafNodeFilter
and V2 V2ExpressionBuilder. V2 unfolds only as a fallback so explicit native handling
(e.g. AES_ENCRYPT) still wins; the V1 leaf unfold preserves the translatedFilterToExpr
mapping by keeping the original expression in the recursive caller. Internal Spark
evaluation handles RuntimeReplaceable via delegation + MaterializeRuntimeReplaceable,
so it needs no unfold.
Co-authored-by: Isaac1 parent 50cc6a1 commit c265f1d
4 files changed
Lines changed: 26 additions & 1 deletion
File tree
- sql
- catalyst/src/main/scala/org/apache/spark/sql/catalyst/util
- core/src
- main/scala/org/apache/spark/sql/execution/datasources
- test/scala/org/apache/spark/sql/execution/datasources
- v2
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
376 | 376 | | |
377 | 377 | | |
378 | 378 | | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
379 | 384 | | |
380 | 385 | | |
381 | 386 | | |
| |||
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
631 | 631 | | |
632 | 632 | | |
633 | 633 | | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
634 | 640 | | |
635 | 641 | | |
636 | | - | |
| 642 | + | |
| 643 | + | |
637 | 644 | | |
638 | 645 | | |
639 | 646 | | |
| |||
699 | 706 | | |
700 | 707 | | |
701 | 708 | | |
| 709 | + | |
702 | 710 | | |
703 | 711 | | |
704 | 712 | | |
| |||
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
96 | 97 | | |
97 | 98 | | |
98 | 99 | | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
99 | 105 | | |
100 | 106 | | |
101 | 107 | | |
| |||
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
110 | 111 | | |
111 | 112 | | |
112 | 113 | | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
113 | 119 | | |
114 | 120 | | |
115 | 121 | | |
| |||
0 commit comments