Eliminate more redundant ProjectionExecs#21333
Eliminate more redundant ProjectionExecs#21333Dandandan wants to merge 7 commits intoapache:mainfrom
ProjectionExecs#21333Conversation
|
run benchmarks |
|
🤖 Benchmark running (GKE) | trigger CPU Details (lscpu)Comparing fix-projection-embedding-order (b0e0c07) to 1e93a67 (merge-base) diff using: tpch File an issue against this benchmark runner |
|
🤖 Benchmark running (GKE) | trigger CPU Details (lscpu)Comparing fix-projection-embedding-order (b0e0c07) to 1e93a67 (merge-base) diff using: tpcds File an issue against this benchmark runner |
|
🤖 Benchmark running (GKE) | trigger CPU Details (lscpu)Comparing fix-projection-embedding-order (b0e0c07) to 1e93a67 (merge-base) diff using: clickbench_partitioned File an issue against this benchmark runner |
b0e0c07 to
6e943ae
Compare
|
🤖 Benchmark completed (GKE) | trigger Instance: CPU Details (lscpu)Details
Resource Usagetpch — base (merge-base)
tpch — branch
File an issue against this benchmark runner |
ProjectionExecs
|
🤖 Benchmark completed (GKE) | trigger Instance: CPU Details (lscpu)Details
Resource Usagetpcds — base (merge-base)
tpcds — branch
File an issue against this benchmark runner |
|
🤖 Benchmark completed (GKE) | trigger Instance: CPU Details (lscpu)Details
Resource Usageclickbench_partitioned — base (merge-base)
clickbench_partitioned — branch
File an issue against this benchmark runner |
|
run benchmarks |
|
🤖 Benchmark running (GKE) | trigger CPU Details (lscpu)Comparing fix-projection-embedding-order (6e943ae) to 1e93a67 (merge-base) diff using: clickbench_partitioned File an issue against this benchmark runner |
6e943ae to
50a9cb2
Compare
|
🤖 Benchmark running (GKE) | trigger CPU Details (lscpu)Comparing fix-projection-embedding-order (50a9cb2) to 1e93a67 (merge-base) diff using: tpcds File an issue against this benchmark runner |
|
🤖 Benchmark running (GKE) | trigger CPU Details (lscpu)Comparing fix-projection-embedding-order (50a9cb2) to 1e93a67 (merge-base) diff using: tpch File an issue against this benchmark runner |
…ProjectionExec nodes When `try_embed_projection` embeds a projection into a HashJoinExec (or other operators), `collect_column_indices` previously collected column indices into a HashSet and sorted them, losing the original column ordering from the projection. This meant that when a projection simply reordered columns, the embedded projection would output columns in sorted index order instead of the desired order, requiring a residual ProjectionExec just to reorder them. This change preserves the insertion order of column indices: - For simple Column expressions: the index is taken directly in projection order - For complex expressions referencing multiple columns: indices are sorted for determinism (since `collect_columns` returns a HashSet) Additionally, the final embedding decision now checks whether the embedding actually reduced the number of columns. If the residual ProjectionExec is not removable AND no columns were eliminated, the embedding is skipped (it would only add an unnecessary column reorder). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
50a9cb2 to
8ad047c
Compare
|
🤖 Benchmark completed (GKE) | trigger Instance: CPU Details (lscpu)Details
Resource Usagetpch — base (merge-base)
tpch — branch
File an issue against this benchmark runner |
|
🤖 Benchmark completed (GKE) | trigger Instance: CPU Details (lscpu)Details
Resource Usagetpcds — base (merge-base)
tpcds — branch
File an issue against this benchmark runner |
|
🤖 Benchmark completed (GKE) | trigger Instance: CPU Details (lscpu)Details
Resource Usageclickbench_partitioned — base (merge-base)
clickbench_partitioned — branch
File an issue against this benchmark runner |
|
run benchmark sql_planner |
|
🤖 Criterion benchmark running (GKE) | trigger CPU Details (lscpu)Comparing fix-projection-embedding-order (15bbe4a) to 1e93a67 (merge-base) diff File an issue against this benchmark runner |
…pression column collection Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
795fa3c to
587064a
Compare
…mplex expression column collection" This reverts commit 68646e8.
…omplex expression column collection" This reverts commit 8037db5.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
🤖 Criterion benchmark completed (GKE) | trigger Instance: CPU Details (lscpu)Details
Resource Usagebase (merge-base)
branch
File an issue against this benchmark runner |
Which issue does this PR close?
Rationale for this change
What changes are included in this PR?
How are these changes tested?
ProjectionExecnodesAre there any user-facing changes?
No, only more efficient plans
🤖 Generated with Claude Code