Skip to content

perf: selective column concat in hash join build side#21735

Closed
SubhamSinghal wants to merge 2 commits intoapache:mainfrom
SubhamSinghal:selective-column-concat-hash-join
Closed

perf: selective column concat in hash join build side#21735
SubhamSinghal wants to merge 2 commits intoapache:mainfrom
SubhamSinghal:selective-column-concat-hash-join

Conversation

@SubhamSinghal
Copy link
Copy Markdown
Contributor

@SubhamSinghal SubhamSinghal commented Apr 19, 2026

Which issue does this PR close?

related to: #18942

Rationale for this change

In CollectLeft hash joins, concat_batches copies all columns from the build side into a single RecordBatch, even when only a subset is needed for the join output, filter evaluation, and key computation. For wide tables (20+ columns), this wastes significant memory and CPU. Savings = (total_columns - needed_columns) / total_columns
For ex:
For a 20-column table needing 3 columns: skips 85% of the copy
For a 10-column table needing 8 columns: skips 20% of the copy
For a 5-column table needing 5 columns: skips 0% (short-circuit)
This PR projects build-side batches to only the needed columns before concat_batches, reducing both peak memory and copy time.

What changes are included in this PR?

datafusion/physical-plan/src/joins/hash_join/exec.rs:

  • compute_build_side_projection() — determines which build-side columns are actually needed (union of output columns, filter columns, and join key expression columns)
  • remap_column_indices() — translates original column indices to projected positions
  • evaluate_and_concat_per_batch() — evaluates join key expressions per-batch before projection, then concatenates result arrays (only used when projection is active)
  • Modified collect_left_input() and try_create_array_map() to project batches before concat_batches when a column subset suffices
  • Added build_column_remap field to JoinLeftData to carry the remap table downstream

datafusion/physical-plan/src/joins/hash_join/stream.rs:

  • In collect_build_side(), remaps column_indices and filter column_indices when build-side projection is active

Are these changes tested?

Yes — covered by existing tests

No new tests added since this is an internal optimization that doesn't change observable behavior. The existing test suite covers all join types, partition modes, filter combinations, empty build sides, and outer join unmatched-row handling.

Are there any user-facing changes?

No.

@github-actions github-actions Bot added the physical-plan Changes to the physical-plan crate label Apr 20, 2026
@SubhamSinghal
Copy link
Copy Markdown
Contributor Author

@Dandandan can you please review this PR?

@Dandandan
Copy link
Copy Markdown
Contributor

run benchmark tpch10 tpcds

@Dandandan
Copy link
Copy Markdown
Contributor

Wouldn't the not required columns be removed with projection pushdown?

@adriangbot
Copy link
Copy Markdown

🤖 Benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c4295053818-1743-x7vk6 6.12.55+ #1 SMP Sun Feb 1 08:59:41 UTC 2026 aarch64 GNU/Linux

CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected

Comparing selective-column-concat-hash-join (2fd3f61) to 3aaf393 (merge-base) diff using: tpch10
Results will be posted here when complete


File an issue against this benchmark runner

@adriangbot
Copy link
Copy Markdown

🤖 Benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c4295053818-1744-2plkd 6.12.55+ #1 SMP Sun Feb 1 08:59:41 UTC 2026 aarch64 GNU/Linux

CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected

Comparing selective-column-concat-hash-join (2fd3f61) to 3aaf393 (merge-base) diff using: tpcds
Results will be posted here when complete


File an issue against this benchmark runner

@adriangbot
Copy link
Copy Markdown

🤖 Benchmark completed (GKE) | trigger

Instance: c4a-highmem-16 (12 vCPU / 65 GiB)

CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected
Details

Comparing HEAD and selective-column-concat-hash-join
--------------------
Benchmark tpch_sf10.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┓
┃ Query     ┃                               HEAD ┃  selective-column-concat-hash-join ┃    Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━┩
│ QQuery 1  │  322.12 / 324.03 ±1.81 / 327.39 ms │  320.75 / 324.15 ±4.80 / 333.64 ms │ no change │
│ QQuery 2  │  133.77 / 139.58 ±3.91 / 145.81 ms │  136.42 / 140.18 ±2.97 / 145.51 ms │ no change │
│ QQuery 3  │  292.90 / 296.02 ±2.90 / 300.18 ms │  292.50 / 296.22 ±2.84 / 299.47 ms │ no change │
│ QQuery 4  │  154.06 / 157.07 ±2.26 / 160.35 ms │  155.38 / 155.97 ±0.60 / 156.98 ms │ no change │
│ QQuery 5  │  430.46 / 439.80 ±8.89 / 456.35 ms │ 421.94 / 437.13 ±11.40 / 457.01 ms │ no change │
│ QQuery 6  │  132.69 / 133.16 ±0.52 / 134.13 ms │  130.26 / 131.78 ±1.31 / 134.12 ms │ no change │
│ QQuery 7  │  550.98 / 557.38 ±6.38 / 565.56 ms │  547.23 / 560.61 ±8.95 / 571.97 ms │ no change │
│ QQuery 8  │  474.57 / 482.23 ±6.54 / 493.82 ms │  475.33 / 482.15 ±5.73 / 488.96 ms │ no change │
│ QQuery 9  │ 664.04 / 678.03 ±12.78 / 700.55 ms │  676.54 / 686.38 ±9.34 / 700.57 ms │ no change │
│ QQuery 10 │  344.22 / 349.65 ±6.11 / 361.12 ms │  333.49 / 340.14 ±4.72 / 346.65 ms │ no change │
│ QQuery 11 │  104.90 / 108.20 ±1.99 / 110.97 ms │  108.14 / 112.05 ±3.80 / 116.64 ms │ no change │
│ QQuery 12 │  198.51 / 202.36 ±3.46 / 208.18 ms │  201.51 / 203.79 ±1.72 / 205.81 ms │ no change │
│ QQuery 13 │  306.89 / 315.73 ±6.95 / 322.42 ms │  300.88 / 314.49 ±9.35 / 325.58 ms │ no change │
│ QQuery 14 │  179.97 / 181.72 ±0.99 / 183.00 ms │  180.42 / 183.27 ±1.78 / 185.24 ms │ no change │
│ QQuery 15 │  326.06 / 329.05 ±1.81 / 330.58 ms │  324.81 / 327.77 ±1.77 / 330.29 ms │ no change │
│ QQuery 16 │     83.97 / 86.20 ±2.64 / 90.66 ms │     83.79 / 85.72 ±1.39 / 88.05 ms │ no change │
│ QQuery 17 │  751.92 / 757.69 ±5.76 / 766.11 ms │  743.18 / 750.17 ±4.26 / 755.73 ms │ no change │
│ QQuery 18 │ 840.42 / 856.54 ±13.59 / 875.13 ms │ 795.28 / 851.38 ±29.55 / 877.15 ms │ no change │
│ QQuery 19 │  265.83 / 272.46 ±5.23 / 280.57 ms │  266.19 / 270.38 ±4.54 / 279.07 ms │ no change │
│ QQuery 20 │  324.56 / 328.46 ±2.17 / 330.79 ms │ 320.14 / 330.47 ±10.27 / 350.02 ms │ no change │
│ QQuery 21 │ 843.10 / 851.12 ±10.77 / 872.37 ms │  841.92 / 851.33 ±8.45 / 866.17 ms │ no change │
│ QQuery 22 │     79.07 / 81.33 ±2.68 / 86.48 ms │     81.05 / 84.07 ±3.27 / 90.11 ms │ no change │
└───────────┴────────────────────────────────────┴────────────────────────────────────┴───────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┓
┃ Benchmark Summary                                ┃           ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━┩
│ Total Time (HEAD)                                │ 7927.80ms │
│ Total Time (selective-column-concat-hash-join)   │ 7919.61ms │
│ Average Time (HEAD)                              │  360.35ms │
│ Average Time (selective-column-concat-hash-join) │  359.98ms │
│ Queries Faster                                   │         0 │
│ Queries Slower                                   │         0 │
│ Queries with No Change                           │        22 │
│ Queries with Failure                             │         0 │
└──────────────────────────────────────────────────┴───────────┘

Resource Usage

tpch10 — base (merge-base)

Metric Value
Wall time 45.0s
Peak memory 11.1 GiB
Avg memory 8.5 GiB
CPU user 420.0s
CPU sys 26.5s
Peak spill 0 B

tpch10 — branch

Metric Value
Wall time 40.0s
Peak memory 11.0 GiB
Avg memory 8.9 GiB
CPU user 419.5s
CPU sys 26.1s
Peak spill 0 B

File an issue against this benchmark runner

@adriangbot
Copy link
Copy Markdown

🤖 Benchmark completed (GKE) | trigger

Instance: c4a-highmem-16 (12 vCPU / 65 GiB)

CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected
Details

Comparing HEAD and selective-column-concat-hash-join
--------------------
Benchmark tpcds_sf1.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Query     ┃                                     HEAD ┃        selective-column-concat-hash-join ┃        Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ QQuery 1  │              6.44 / 6.89 ±0.73 / 8.36 ms │              6.36 / 6.80 ±0.74 / 8.28 ms │     no change │
│ QQuery 2  │        144.80 / 145.94 ±0.64 / 146.56 ms │        145.46 / 147.03 ±0.88 / 148.10 ms │     no change │
│ QQuery 3  │        112.96 / 114.29 ±0.82 / 115.52 ms │        112.86 / 113.27 ±0.54 / 114.33 ms │     no change │
│ QQuery 4  │    1229.18 / 1254.11 ±14.45 / 1271.13 ms │    1236.28 / 1262.39 ±18.72 / 1280.67 ms │     no change │
│ QQuery 5  │        171.87 / 174.12 ±1.34 / 175.60 ms │        170.61 / 172.86 ±2.31 / 177.22 ms │     no change │
│ QQuery 6  │       816.15 / 847.97 ±24.70 / 889.08 ms │       834.44 / 865.11 ±31.05 / 920.49 ms │     no change │
│ QQuery 7  │        336.46 / 342.35 ±3.24 / 345.29 ms │        339.56 / 341.45 ±1.36 / 343.51 ms │     no change │
│ QQuery 8  │        114.93 / 117.03 ±1.28 / 118.49 ms │        114.54 / 116.28 ±1.05 / 117.81 ms │     no change │
│ QQuery 9  │        100.23 / 102.39 ±2.57 / 107.44 ms │         99.77 / 103.79 ±3.12 / 107.08 ms │     no change │
│ QQuery 10 │        104.81 / 105.76 ±1.00 / 107.00 ms │        102.37 / 104.73 ±1.50 / 106.79 ms │     no change │
│ QQuery 11 │        871.15 / 878.53 ±4.42 / 882.99 ms │        868.69 / 874.45 ±5.24 / 882.51 ms │     no change │
│ QQuery 12 │           44.54 / 45.91 ±0.88 / 47.30 ms │           44.00 / 45.28 ±0.75 / 46.25 ms │     no change │
│ QQuery 13 │        394.97 / 399.00 ±3.82 / 405.79 ms │        395.04 / 399.37 ±3.75 / 405.74 ms │     no change │
│ QQuery 14 │       985.95 / 997.99 ±8.88 / 1011.70 ms │       984.54 / 994.80 ±6.80 / 1004.33 ms │     no change │
│ QQuery 15 │           15.07 / 16.51 ±1.06 / 17.98 ms │           15.07 / 16.05 ±0.67 / 17.11 ms │     no change │
│ QQuery 16 │              7.04 / 7.34 ±0.15 / 7.45 ms │              6.88 / 7.24 ±0.31 / 7.76 ms │     no change │
│ QQuery 17 │        226.86 / 228.39 ±1.29 / 229.86 ms │        225.17 / 227.42 ±1.53 / 229.53 ms │     no change │
│ QQuery 18 │        125.49 / 126.36 ±0.88 / 128.02 ms │        124.22 / 125.78 ±1.31 / 127.16 ms │     no change │
│ QQuery 19 │        155.04 / 156.86 ±1.40 / 158.35 ms │        153.22 / 154.61 ±1.23 / 156.15 ms │     no change │
│ QQuery 20 │           14.03 / 15.14 ±0.81 / 16.26 ms │           13.69 / 13.85 ±0.19 / 14.09 ms │ +1.09x faster │
│ QQuery 21 │           19.34 / 19.55 ±0.14 / 19.70 ms │           19.17 / 19.83 ±0.34 / 20.13 ms │     no change │
│ QQuery 22 │        479.06 / 483.43 ±2.67 / 486.56 ms │        478.96 / 481.23 ±1.62 / 483.72 ms │     no change │
│ QQuery 23 │        859.22 / 863.96 ±4.42 / 869.32 ms │        850.33 / 859.61 ±5.59 / 866.72 ms │     no change │
│ QQuery 24 │        379.76 / 382.44 ±1.35 / 383.29 ms │        377.10 / 380.40 ±2.08 / 383.45 ms │     no change │
│ QQuery 25 │        338.64 / 341.01 ±2.40 / 344.35 ms │        342.07 / 343.14 ±1.02 / 344.78 ms │     no change │
│ QQuery 26 │           80.16 / 81.52 ±0.84 / 82.81 ms │           80.12 / 81.62 ±1.14 / 82.83 ms │     no change │
│ QQuery 27 │              6.56 / 7.60 ±0.84 / 8.89 ms │              6.70 / 7.38 ±0.54 / 8.09 ms │     no change │
│ QQuery 28 │        148.04 / 149.00 ±0.92 / 150.52 ms │        148.35 / 149.70 ±1.14 / 151.71 ms │     no change │
│ QQuery 29 │        279.94 / 281.22 ±0.98 / 282.61 ms │        280.84 / 282.83 ±1.45 / 285.30 ms │     no change │
│ QQuery 30 │           42.46 / 43.56 ±0.94 / 44.64 ms │           43.19 / 44.37 ±1.00 / 46.00 ms │     no change │
│ QQuery 31 │        169.47 / 172.17 ±2.11 / 175.42 ms │        170.58 / 172.26 ±1.36 / 174.67 ms │     no change │
│ QQuery 32 │           13.90 / 14.15 ±0.28 / 14.69 ms │           13.27 / 13.81 ±0.50 / 14.74 ms │     no change │
│ QQuery 33 │        140.03 / 140.84 ±1.00 / 142.75 ms │        140.44 / 141.74 ±1.22 / 143.53 ms │     no change │
│ QQuery 34 │              6.81 / 6.99 ±0.22 / 7.42 ms │              6.66 / 6.95 ±0.28 / 7.46 ms │     no change │
│ QQuery 35 │        106.29 / 107.87 ±0.97 / 108.94 ms │        105.61 / 107.71 ±2.08 / 111.67 ms │     no change │
│ QQuery 36 │              6.21 / 6.50 ±0.23 / 6.88 ms │              6.44 / 6.72 ±0.16 / 6.89 ms │     no change │
│ QQuery 37 │              8.29 / 8.90 ±0.51 / 9.80 ms │              8.08 / 8.61 ±0.45 / 9.28 ms │     no change │
│ QQuery 38 │           81.40 / 85.49 ±4.45 / 93.74 ms │           83.15 / 86.81 ±4.59 / 95.61 ms │     no change │
│ QQuery 39 │        123.03 / 125.43 ±1.47 / 127.46 ms │        123.72 / 126.65 ±2.68 / 131.19 ms │     no change │
│ QQuery 40 │        106.66 / 114.98 ±7.02 / 127.89 ms │        109.47 / 114.88 ±7.11 / 128.19 ms │     no change │
│ QQuery 41 │           14.85 / 16.06 ±0.70 / 17.01 ms │           14.47 / 14.94 ±0.39 / 15.62 ms │ +1.07x faster │
│ QQuery 42 │        108.26 / 109.69 ±1.03 / 110.92 ms │        108.56 / 109.70 ±0.80 / 110.59 ms │     no change │
│ QQuery 43 │              5.51 / 5.66 ±0.15 / 5.94 ms │              5.51 / 5.69 ±0.15 / 5.97 ms │     no change │
│ QQuery 44 │           11.25 / 11.53 ±0.23 / 11.93 ms │           11.39 / 11.67 ±0.26 / 12.15 ms │     no change │
│ QQuery 45 │           49.79 / 51.38 ±1.76 / 54.46 ms │           50.38 / 50.98 ±0.75 / 52.46 ms │     no change │
│ QQuery 46 │              7.93 / 8.61 ±0.62 / 9.76 ms │              8.22 / 8.62 ±0.24 / 8.90 ms │     no change │
│ QQuery 47 │        681.59 / 685.82 ±4.31 / 692.97 ms │        675.57 / 681.88 ±3.33 / 685.25 ms │     no change │
│ QQuery 48 │        290.35 / 292.03 ±2.17 / 296.30 ms │        285.89 / 289.83 ±4.34 / 298.05 ms │     no change │
│ QQuery 49 │        248.78 / 251.04 ±1.46 / 253.33 ms │        249.47 / 251.32 ±1.72 / 253.91 ms │     no change │
│ QQuery 50 │        218.89 / 223.01 ±3.91 / 229.32 ms │        213.94 / 221.22 ±5.28 / 229.87 ms │     no change │
│ QQuery 51 │        177.66 / 181.52 ±2.41 / 184.78 ms │        175.72 / 179.76 ±2.47 / 182.53 ms │     no change │
│ QQuery 52 │        106.71 / 108.30 ±0.85 / 109.12 ms │        106.63 / 108.94 ±1.43 / 111.04 ms │     no change │
│ QQuery 53 │         99.98 / 102.24 ±1.64 / 104.53 ms │        100.10 / 101.27 ±1.12 / 103.36 ms │     no change │
│ QQuery 54 │        144.65 / 146.56 ±1.44 / 148.81 ms │        144.29 / 145.44 ±0.96 / 146.71 ms │     no change │
│ QQuery 55 │        106.35 / 108.79 ±1.93 / 112.13 ms │        105.44 / 108.41 ±2.01 / 111.15 ms │     no change │
│ QQuery 56 │        139.86 / 141.01 ±1.32 / 143.50 ms │        139.38 / 141.00 ±1.59 / 142.97 ms │     no change │
│ QQuery 57 │        170.34 / 173.08 ±1.47 / 174.63 ms │        171.26 / 172.49 ±0.79 / 173.66 ms │     no change │
│ QQuery 58 │        268.63 / 271.89 ±1.72 / 273.76 ms │        270.89 / 272.05 ±0.76 / 273.02 ms │     no change │
│ QQuery 59 │        194.34 / 196.54 ±1.19 / 197.92 ms │        196.64 / 199.22 ±2.16 / 202.35 ms │     no change │
│ QQuery 60 │        143.15 / 144.21 ±0.85 / 145.20 ms │        140.96 / 142.70 ±1.19 / 144.12 ms │     no change │
│ QQuery 61 │           12.59 / 12.85 ±0.24 / 13.17 ms │           12.34 / 12.62 ±0.30 / 13.19 ms │     no change │
│ QQuery 62 │       885.88 / 905.40 ±14.13 / 928.06 ms │       869.42 / 905.47 ±25.39 / 939.67 ms │     no change │
│ QQuery 63 │        105.57 / 107.78 ±1.66 / 110.41 ms │        102.47 / 105.24 ±1.63 / 107.27 ms │     no change │
│ QQuery 64 │        671.97 / 679.44 ±5.26 / 687.20 ms │        672.97 / 676.33 ±2.78 / 679.92 ms │     no change │
│ QQuery 65 │        249.38 / 250.54 ±1.99 / 254.51 ms │        247.34 / 250.07 ±2.24 / 252.87 ms │     no change │
│ QQuery 66 │       241.04 / 250.74 ±10.44 / 270.86 ms │        241.13 / 246.92 ±4.53 / 254.10 ms │     no change │
│ QQuery 67 │        301.66 / 311.04 ±5.19 / 316.76 ms │        300.86 / 310.66 ±9.02 / 326.14 ms │     no change │
│ QQuery 68 │             8.27 / 9.65 ±0.83 / 10.69 ms │             8.45 / 9.05 ±0.88 / 10.77 ms │ +1.07x faster │
│ QQuery 69 │        100.76 / 104.15 ±2.54 / 108.52 ms │         99.34 / 101.68 ±1.80 / 104.33 ms │     no change │
│ QQuery 70 │        332.12 / 342.13 ±8.25 / 355.80 ms │       333.49 / 346.46 ±12.26 / 368.63 ms │     no change │
│ QQuery 71 │        135.07 / 137.27 ±1.45 / 139.10 ms │        133.64 / 137.52 ±3.92 / 144.98 ms │     no change │
│ QQuery 72 │        609.41 / 620.67 ±8.89 / 634.84 ms │        599.95 / 610.99 ±6.37 / 616.98 ms │     no change │
│ QQuery 73 │              7.19 / 7.69 ±0.41 / 8.35 ms │              7.04 / 7.94 ±0.79 / 9.18 ms │     no change │
│ QQuery 74 │        530.56 / 537.25 ±3.80 / 541.80 ms │        529.95 / 537.18 ±3.91 / 541.57 ms │     no change │
│ QQuery 75 │        275.47 / 276.63 ±1.35 / 279.01 ms │        269.38 / 274.41 ±2.89 / 278.05 ms │     no change │
│ QQuery 76 │        129.87 / 131.53 ±1.10 / 133.30 ms │        129.60 / 132.79 ±1.89 / 134.85 ms │     no change │
│ QQuery 77 │        189.40 / 190.57 ±0.76 / 191.52 ms │        187.55 / 188.71 ±0.90 / 189.76 ms │     no change │
│ QQuery 78 │        333.65 / 337.07 ±3.66 / 344.00 ms │        331.46 / 337.58 ±3.93 / 343.34 ms │     no change │
│ QQuery 79 │        231.49 / 232.15 ±1.00 / 234.14 ms │        224.47 / 229.79 ±4.21 / 234.69 ms │     no change │
│ QQuery 80 │        320.98 / 324.86 ±2.82 / 329.08 ms │        322.15 / 325.09 ±2.84 / 329.34 ms │     no change │
│ QQuery 81 │           25.47 / 26.15 ±0.58 / 27.00 ms │           25.47 / 26.91 ±1.16 / 28.97 ms │     no change │
│ QQuery 82 │           40.29 / 41.27 ±0.82 / 42.71 ms │           40.27 / 41.71 ±1.40 / 43.40 ms │     no change │
│ QQuery 83 │           37.40 / 38.01 ±0.51 / 38.88 ms │           36.51 / 38.49 ±1.36 / 40.23 ms │     no change │
│ QQuery 84 │           48.47 / 49.49 ±0.93 / 51.01 ms │           47.17 / 47.95 ±0.66 / 48.71 ms │     no change │
│ QQuery 85 │        146.07 / 148.16 ±1.47 / 149.82 ms │        147.17 / 148.79 ±2.00 / 152.46 ms │     no change │
│ QQuery 86 │           38.24 / 39.08 ±0.76 / 39.99 ms │           37.18 / 38.61 ±0.81 / 39.38 ms │     no change │
│ QQuery 87 │           84.95 / 87.32 ±1.70 / 90.20 ms │           85.39 / 87.32 ±2.65 / 92.51 ms │     no change │
│ QQuery 88 │          98.63 / 99.41 ±1.05 / 101.46 ms │           97.66 / 98.42 ±0.57 / 99.28 ms │     no change │
│ QQuery 89 │        117.76 / 118.91 ±0.61 / 119.40 ms │        117.43 / 118.27 ±0.59 / 119.26 ms │     no change │
│ QQuery 90 │           22.89 / 23.53 ±0.46 / 24.05 ms │           23.36 / 23.96 ±0.81 / 25.53 ms │     no change │
│ QQuery 91 │           61.75 / 63.22 ±1.01 / 64.56 ms │           62.10 / 63.26 ±0.86 / 64.47 ms │     no change │
│ QQuery 92 │           56.60 / 57.36 ±0.73 / 58.56 ms │           56.42 / 57.51 ±1.10 / 59.00 ms │     no change │
│ QQuery 93 │        184.32 / 186.33 ±1.44 / 188.72 ms │        185.72 / 186.32 ±0.53 / 187.05 ms │     no change │
│ QQuery 94 │           60.54 / 62.03 ±1.29 / 63.64 ms │           61.70 / 62.56 ±0.89 / 64.20 ms │     no change │
│ QQuery 95 │        127.19 / 128.84 ±1.22 / 130.44 ms │        128.38 / 129.90 ±1.42 / 132.26 ms │     no change │
│ QQuery 96 │           69.96 / 72.39 ±1.67 / 74.25 ms │           70.80 / 73.33 ±1.76 / 76.14 ms │     no change │
│ QQuery 97 │        122.12 / 125.21 ±2.29 / 128.80 ms │        124.54 / 125.56 ±0.85 / 126.69 ms │     no change │
│ QQuery 98 │        154.52 / 155.62 ±0.93 / 156.71 ms │        151.68 / 153.84 ±1.58 / 155.81 ms │     no change │
│ QQuery 99 │ 10681.85 / 10698.85 ±19.25 / 10728.08 ms │ 10662.21 / 10678.82 ±18.42 / 10714.26 ms │     no change │
└───────────┴──────────────────────────────────────────┴──────────────────────────────────────────┴───────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Benchmark Summary                                ┃            ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ Total Time (HEAD)                                │ 30739.04ms │
│ Total Time (selective-column-concat-hash-join)   │ 30693.97ms │
│ Average Time (HEAD)                              │   310.50ms │
│ Average Time (selective-column-concat-hash-join) │   310.04ms │
│ Queries Faster                                   │          3 │
│ Queries Slower                                   │          0 │
│ Queries with No Change                           │         96 │
│ Queries with Failure                             │          0 │
└──────────────────────────────────────────────────┴────────────┘

Resource Usage

tpcds — base (merge-base)

Metric Value
Wall time 155.0s
Peak memory 6.6 GiB
Avg memory 5.4 GiB
CPU user 254.6s
CPU sys 16.7s
Peak spill 0 B

tpcds — branch

Metric Value
Wall time 155.0s
Peak memory 6.4 GiB
Avg memory 5.4 GiB
CPU user 254.4s
CPU sys 16.4s
Peak spill 0 B

File an issue against this benchmark runner

@SubhamSinghal
Copy link
Copy Markdown
Contributor Author

Wouldn't the not required columns be removed with projection pushdown?

right. Totally missed this. I think this PR is not adding any value. Closing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

physical-plan Changes to the physical-plan crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants