Skip to content

Support Date32/Date64 in unwrap_cast optimization#21665

Open
Dandandan wants to merge 2 commits intoapache:mainfrom
Dandandan:unwrap-cast-date-types
Open

Support Date32/Date64 in unwrap_cast optimization#21665
Dandandan wants to merge 2 commits intoapache:mainfrom
Dandandan:unwrap-cast-date-types

Conversation

@Dandandan
Copy link
Copy Markdown
Contributor

@Dandandan Dandandan commented Apr 16, 2026

Which issue does this PR close?

N/A

Rationale for this change

Filters like WHERE EventDate >= '2013-07-01' on a UInt16 column exposed as Date32 via a view produce CAST(CAST(EventDate AS Int32) AS Date32) >= Date32("2013-07-01") — 4 CAST operations per row. The existing unwrap_cast_in_comparison optimizer can eliminate these but didn't support Date32/Date64.

What changes are included in this PR?

Add Date32/Date64 to is_supported_numeric_type and the match arms in try_cast_numeric_literal. They are treated like Int32/Int64 since that's their physical representation (days / ms since epoch).

A guard prevents Date↔Timestamp unwrapping, which is lossy (drops time-of-day).

ClickBench Q36-Q42 before:

FilterExec: CAST(CAST(EventDate@0 AS Int32) AS Date32) >= 2013-07-01
        AND CAST(CAST(EventDate@0 AS Int32) AS Date32) <= 2013-07-31

After:

FilterExec: EventDate@0 >= 15887 AND EventDate@0 <= 15917

Are these changes tested?

Existing casts tests pass. ClickBench sqllogictest expectations updated.

Are there any user-facing changes?

No.

@github-actions github-actions bot added logical-expr Logical plan and expressions sqllogictest SQL Logic Tests (.slt) labels Apr 16, 2026
@Dandandan
Copy link
Copy Markdown
Contributor Author

run benchmarks

@adriangbot
Copy link
Copy Markdown

🤖 Benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c4257615152-1337-8rzdd 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 unwrap-cast-date-types (e9a740e) to 8dedd12 (merge-base) diff using: clickbench_partitioned
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-c4257615152-1338-69bzs 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 unwrap-cast-date-types (e9a740e) to 8dedd12 (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 running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c4257615152-1339-kqgh9 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 unwrap-cast-date-types (e9a740e) to 8dedd12 (merge-base) diff using: tpch
Results will be posted here when complete


File an issue against this benchmark runner

@Dandandan Dandandan force-pushed the unwrap-cast-date-types branch 2 times, most recently from f2d022e to 4d0268f Compare April 16, 2026 05:51
@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 unwrap-cast-date-types
--------------------
Benchmark clickbench_partitioned.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Query     ┃                                  HEAD ┃                unwrap-cast-date-types ┃        Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ QQuery 0  │          1.21 / 4.41 ±6.30 / 17.01 ms │          1.20 / 4.39 ±6.30 / 16.99 ms │     no change │
│ QQuery 1  │        14.76 / 15.12 ±0.19 / 15.28 ms │        14.15 / 14.32 ±0.20 / 14.69 ms │ +1.06x faster │
│ QQuery 2  │        43.97 / 44.41 ±0.24 / 44.66 ms │        42.97 / 43.50 ±0.35 / 44.01 ms │     no change │
│ QQuery 3  │        44.20 / 45.08 ±0.88 / 46.73 ms │        42.15 / 43.73 ±0.91 / 44.65 ms │     no change │
│ QQuery 4  │     283.02 / 290.76 ±6.78 / 300.81 ms │     279.38 / 286.39 ±7.12 / 298.79 ms │     no change │
│ QQuery 5  │     335.87 / 338.95 ±2.63 / 343.09 ms │     337.39 / 341.62 ±3.23 / 345.59 ms │     no change │
│ QQuery 6  │           5.78 / 6.12 ±0.26 / 6.37 ms │           5.52 / 6.06 ±0.43 / 6.64 ms │     no change │
│ QQuery 7  │        16.49 / 17.01 ±0.44 / 17.75 ms │        16.13 / 19.23 ±4.50 / 28.11 ms │  1.13x slower │
│ QQuery 8  │    406.91 / 420.81 ±13.33 / 441.35 ms │    397.04 / 421.25 ±18.26 / 453.75 ms │     no change │
│ QQuery 9  │     631.13 / 635.23 ±3.39 / 639.10 ms │     629.57 / 636.86 ±4.72 / 642.44 ms │     no change │
│ QQuery 10 │        92.61 / 94.16 ±1.23 / 95.29 ms │       91.99 / 95.21 ±4.98 / 105.13 ms │     no change │
│ QQuery 11 │     103.59 / 105.02 ±1.05 / 106.37 ms │     104.72 / 105.62 ±1.10 / 107.74 ms │     no change │
│ QQuery 12 │     331.83 / 335.97 ±3.84 / 343.17 ms │     338.79 / 343.05 ±5.70 / 353.76 ms │     no change │
│ QQuery 13 │     452.38 / 467.77 ±9.63 / 478.02 ms │    448.69 / 463.57 ±12.19 / 478.13 ms │     no change │
│ QQuery 14 │     335.04 / 340.65 ±3.33 / 345.17 ms │     341.69 / 343.60 ±2.57 / 348.68 ms │     no change │
│ QQuery 15 │     345.15 / 354.87 ±8.81 / 367.26 ms │    343.74 / 357.40 ±14.77 / 381.01 ms │     no change │
│ QQuery 16 │     702.56 / 709.17 ±5.85 / 719.88 ms │    704.29 / 726.08 ±23.62 / 766.08 ms │     no change │
│ QQuery 17 │     696.15 / 700.41 ±2.86 / 703.83 ms │    708.07 / 722.85 ±23.77 / 769.39 ms │     no change │
│ QQuery 18 │ 1381.94 / 1454.27 ±39.65 / 1490.29 ms │ 1385.60 / 1456.73 ±43.00 / 1515.84 ms │     no change │
│ QQuery 19 │        34.38 / 36.01 ±1.20 / 37.37 ms │       35.22 / 43.73 ±15.90 / 75.50 ms │  1.21x slower │
│ QQuery 20 │    716.95 / 732.40 ±15.29 / 756.47 ms │    716.86 / 729.81 ±17.41 / 763.61 ms │     no change │
│ QQuery 21 │     758.53 / 762.48 ±3.87 / 767.88 ms │     761.16 / 770.01 ±7.73 / 781.53 ms │     no change │
│ QQuery 22 │  1123.35 / 1130.60 ±8.48 / 1147.12 ms │  1135.99 / 1144.66 ±4.87 / 1150.82 ms │     no change │
│ QQuery 23 │ 3060.76 / 3079.91 ±13.75 / 3095.76 ms │ 3110.85 / 3132.58 ±14.28 / 3152.20 ms │     no change │
│ QQuery 24 │     100.66 / 103.61 ±1.96 / 106.29 ms │     101.20 / 103.35 ±1.58 / 105.94 ms │     no change │
│ QQuery 25 │     140.51 / 143.34 ±1.73 / 145.12 ms │     141.90 / 144.10 ±2.14 / 147.90 ms │     no change │
│ QQuery 26 │      98.15 / 102.15 ±2.65 / 106.41 ms │      99.28 / 102.47 ±2.06 / 105.25 ms │     no change │
│ QQuery 27 │     844.59 / 849.19 ±5.00 / 858.15 ms │     848.92 / 855.96 ±6.54 / 866.72 ms │     no change │
│ QQuery 28 │ 3222.58 / 3240.06 ±10.50 / 3252.46 ms │  3258.56 / 3267.38 ±4.62 / 3271.44 ms │     no change │
│ QQuery 29 │     49.65 / 100.69 ±47.56 / 179.09 ms │        49.82 / 52.80 ±3.16 / 57.72 ms │ +1.91x faster │
│ QQuery 30 │    357.98 / 373.82 ±18.01 / 409.05 ms │     357.84 / 366.05 ±6.91 / 377.34 ms │     no change │
│ QQuery 31 │    383.01 / 401.03 ±13.91 / 416.77 ms │     357.01 / 374.02 ±9.44 / 384.63 ms │ +1.07x faster │
│ QQuery 32 │ 1181.71 / 1209.74 ±18.21 / 1229.41 ms │ 1017.68 / 1032.87 ±16.58 / 1064.00 ms │ +1.17x faster │
│ QQuery 33 │ 1462.34 / 1521.70 ±34.23 / 1552.70 ms │  1418.38 / 1428.29 ±7.14 / 1438.42 ms │ +1.07x faster │
│ QQuery 34 │ 1544.92 / 1605.84 ±38.68 / 1657.15 ms │  1421.49 / 1433.29 ±8.18 / 1444.00 ms │ +1.12x faster │
│ QQuery 35 │    376.79 / 398.96 ±32.07 / 462.43 ms │     381.01 / 388.25 ±4.37 / 393.69 ms │     no change │
│ QQuery 36 │     116.06 / 119.57 ±2.49 / 122.60 ms │     119.53 / 121.85 ±2.24 / 126.10 ms │     no change │
│ QQuery 37 │        47.01 / 48.29 ±1.29 / 50.76 ms │        46.56 / 48.85 ±1.44 / 50.98 ms │     no change │
│ QQuery 38 │        73.20 / 75.34 ±1.59 / 77.55 ms │        74.23 / 75.19 ±0.99 / 76.64 ms │     no change │
│ QQuery 39 │    209.01 / 219.07 ±10.35 / 231.88 ms │     201.56 / 214.82 ±9.52 / 229.15 ms │     no change │
│ QQuery 40 │        23.67 / 26.72 ±2.03 / 29.48 ms │        23.08 / 25.21 ±1.36 / 26.66 ms │ +1.06x faster │
│ QQuery 41 │        20.39 / 21.97 ±1.11 / 23.87 ms │        19.85 / 21.89 ±1.59 / 24.53 ms │     no change │
│ QQuery 42 │        20.30 / 21.44 ±1.17 / 22.94 ms │        18.92 / 19.62 ±0.45 / 20.22 ms │ +1.09x faster │
└───────────┴───────────────────────────────────────┴───────────────────────────────────────┴───────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Benchmark Summary                     ┃            ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ Total Time (HEAD)                     │ 22704.09ms │
│ Total Time (unwrap-cast-date-types)   │ 22328.51ms │
│ Average Time (HEAD)                   │   528.00ms │
│ Average Time (unwrap-cast-date-types) │   519.27ms │
│ Queries Faster                        │          8 │
│ Queries Slower                        │          2 │
│ Queries with No Change                │         33 │
│ Queries with Failure                  │          0 │
└───────────────────────────────────────┴────────────┘

Resource Usage

clickbench_partitioned — base (merge-base)

Metric Value
Wall time 114.4s
Peak memory 37.1 GiB
Avg memory 27.8 GiB
CPU user 1059.3s
CPU sys 102.8s
Peak spill 0 B

clickbench_partitioned — branch

Metric Value
Wall time 112.7s
Peak memory 41.0 GiB
Avg memory 30.1 GiB
CPU user 1064.7s
CPU sys 81.8s
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 unwrap-cast-date-types
--------------------
Benchmark tpcds_sf1.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Query     ┃                                     HEAD ┃                   unwrap-cast-date-types ┃        Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ QQuery 1  │              6.83 / 7.27 ±0.79 / 8.85 ms │              6.61 / 7.12 ±0.81 / 8.74 ms │     no change │
│ QQuery 2  │        145.66 / 146.16 ±0.54 / 147.16 ms │        144.92 / 145.65 ±0.86 / 147.20 ms │     no change │
│ QQuery 3  │        113.87 / 115.00 ±0.66 / 115.78 ms │        114.58 / 115.12 ±0.64 / 116.38 ms │     no change │
│ QQuery 4  │    1340.95 / 1363.99 ±20.81 / 1400.44 ms │    1296.92 / 1319.04 ±17.07 / 1345.18 ms │     no change │
│ QQuery 5  │        171.57 / 172.79 ±0.96 / 173.91 ms │        172.32 / 174.98 ±1.82 / 177.62 ms │     no change │
│ QQuery 6  │       812.42 / 847.50 ±24.32 / 886.07 ms │       810.49 / 840.48 ±22.78 / 873.78 ms │     no change │
│ QQuery 7  │        344.96 / 347.79 ±3.92 / 355.57 ms │        344.25 / 351.55 ±4.37 / 356.39 ms │     no change │
│ QQuery 8  │        115.79 / 116.68 ±0.87 / 118.17 ms │        118.14 / 119.44 ±1.07 / 120.85 ms │     no change │
│ QQuery 9  │        102.09 / 105.69 ±2.77 / 109.68 ms │        101.77 / 104.73 ±3.10 / 108.58 ms │     no change │
│ QQuery 10 │        107.82 / 109.25 ±1.09 / 110.74 ms │        109.21 / 109.95 ±0.60 / 110.82 ms │     no change │
│ QQuery 11 │        948.34 / 955.89 ±5.87 / 964.11 ms │       892.47 / 911.70 ±12.59 / 931.13 ms │     no change │
│ QQuery 12 │           44.14 / 46.55 ±1.43 / 48.52 ms │           46.85 / 48.24 ±1.20 / 49.97 ms │     no change │
│ QQuery 13 │        401.83 / 406.53 ±4.64 / 413.92 ms │        402.73 / 410.78 ±8.62 / 426.46 ms │     no change │
│ QQuery 14 │     1008.35 / 1015.54 ±4.89 / 1021.11 ms │     1004.94 / 1008.25 ±3.41 / 1014.62 ms │     no change │
│ QQuery 15 │           16.32 / 17.57 ±1.46 / 20.24 ms │           15.59 / 16.73 ±0.84 / 17.95 ms │     no change │
│ QQuery 16 │              7.49 / 8.07 ±0.47 / 8.90 ms │              7.22 / 7.81 ±0.70 / 9.15 ms │     no change │
│ QQuery 17 │        231.36 / 232.56 ±0.97 / 233.69 ms │        229.67 / 231.22 ±1.21 / 232.40 ms │     no change │
│ QQuery 18 │        128.12 / 128.85 ±0.60 / 129.87 ms │        127.16 / 127.82 ±0.73 / 129.18 ms │     no change │
│ QQuery 19 │        154.78 / 157.55 ±2.39 / 161.69 ms │        155.11 / 157.54 ±1.81 / 159.82 ms │     no change │
│ QQuery 20 │           13.68 / 14.30 ±0.39 / 14.82 ms │           13.58 / 14.48 ±0.53 / 15.06 ms │     no change │
│ QQuery 21 │           19.66 / 19.88 ±0.15 / 20.08 ms │           19.23 / 19.63 ±0.44 / 20.40 ms │     no change │
│ QQuery 22 │        490.14 / 495.26 ±2.93 / 498.52 ms │        489.26 / 493.89 ±3.03 / 498.74 ms │     no change │
│ QQuery 23 │        866.07 / 873.85 ±7.72 / 886.25 ms │        872.29 / 878.09 ±5.27 / 885.01 ms │     no change │
│ QQuery 24 │        383.10 / 385.46 ±1.40 / 386.79 ms │        382.93 / 385.45 ±2.21 / 389.01 ms │     no change │
│ QQuery 25 │        343.77 / 345.25 ±1.11 / 347.16 ms │        341.07 / 342.96 ±1.90 / 346.01 ms │     no change │
│ QQuery 26 │           81.88 / 83.33 ±1.15 / 85.34 ms │           80.35 / 83.97 ±2.18 / 87.06 ms │     no change │
│ QQuery 27 │              7.36 / 8.05 ±0.62 / 8.97 ms │              6.87 / 7.39 ±0.47 / 8.15 ms │ +1.09x faster │
│ QQuery 28 │        150.16 / 151.15 ±1.16 / 153.14 ms │        148.96 / 150.66 ±0.99 / 151.96 ms │     no change │
│ QQuery 29 │        282.43 / 285.62 ±1.77 / 287.49 ms │        281.58 / 283.90 ±2.00 / 286.72 ms │     no change │
│ QQuery 30 │           43.47 / 45.00 ±1.09 / 46.18 ms │           44.50 / 45.84 ±0.92 / 47.08 ms │     no change │
│ QQuery 31 │        170.93 / 173.22 ±1.30 / 174.81 ms │        170.35 / 172.51 ±2.14 / 176.02 ms │     no change │
│ QQuery 32 │           56.98 / 58.54 ±1.29 / 60.91 ms │           57.06 / 57.73 ±0.53 / 58.58 ms │     no change │
│ QQuery 33 │        140.93 / 143.13 ±1.27 / 144.86 ms │        140.68 / 143.55 ±2.59 / 148.00 ms │     no change │
│ QQuery 34 │              6.84 / 7.26 ±0.31 / 7.68 ms │              7.11 / 7.52 ±0.50 / 8.41 ms │     no change │
│ QQuery 35 │        108.19 / 109.45 ±0.69 / 110.11 ms │        107.07 / 110.96 ±2.16 / 113.46 ms │     no change │
│ QQuery 36 │              6.45 / 6.76 ±0.33 / 7.37 ms │              6.77 / 6.96 ±0.16 / 7.18 ms │     no change │
│ QQuery 37 │              8.49 / 8.81 ±0.26 / 9.15 ms │              8.32 / 8.58 ±0.15 / 8.77 ms │     no change │
│ QQuery 38 │           84.91 / 87.60 ±3.26 / 93.64 ms │           86.89 / 88.51 ±2.29 / 93.02 ms │     no change │
│ QQuery 39 │        128.12 / 130.55 ±2.00 / 133.43 ms │        122.48 / 127.71 ±2.78 / 130.52 ms │     no change │
│ QQuery 40 │        117.60 / 122.91 ±6.28 / 135.06 ms │        109.84 / 115.72 ±6.38 / 127.88 ms │ +1.06x faster │
│ QQuery 41 │           14.74 / 15.78 ±0.92 / 17.21 ms │           14.31 / 15.53 ±1.16 / 17.66 ms │     no change │
│ QQuery 42 │        108.34 / 110.29 ±1.17 / 112.02 ms │        107.30 / 108.42 ±1.14 / 110.18 ms │     no change │
│ QQuery 43 │              6.06 / 6.25 ±0.22 / 6.66 ms │              6.23 / 6.47 ±0.22 / 6.80 ms │     no change │
│ QQuery 44 │           11.99 / 12.36 ±0.35 / 12.87 ms │           11.92 / 12.62 ±0.74 / 13.97 ms │     no change │
│ QQuery 45 │           51.37 / 52.19 ±0.64 / 53.21 ms │           50.57 / 51.39 ±0.52 / 52.12 ms │     no change │
│ QQuery 46 │              8.59 / 9.05 ±0.40 / 9.70 ms │              8.33 / 8.93 ±0.44 / 9.61 ms │     no change │
│ QQuery 47 │       699.15 / 709.93 ±10.76 / 728.04 ms │        696.35 / 703.88 ±7.30 / 714.86 ms │     no change │
│ QQuery 48 │        285.92 / 292.02 ±5.71 / 301.85 ms │        283.18 / 291.41 ±4.15 / 294.19 ms │     no change │
│ QQuery 49 │        250.58 / 254.02 ±1.97 / 256.22 ms │        251.30 / 254.48 ±2.82 / 258.49 ms │     no change │
│ QQuery 50 │        219.24 / 223.51 ±3.53 / 227.66 ms │        218.41 / 222.82 ±5.20 / 232.16 ms │     no change │
│ QQuery 51 │        181.23 / 185.26 ±2.98 / 189.53 ms │        183.25 / 185.22 ±1.56 / 186.82 ms │     no change │
│ QQuery 52 │        108.35 / 110.27 ±1.38 / 112.50 ms │        108.55 / 109.03 ±0.36 / 109.62 ms │     no change │
│ QQuery 53 │        105.07 / 106.16 ±1.27 / 108.58 ms │        103.30 / 103.99 ±0.60 / 105.05 ms │     no change │
│ QQuery 54 │        149.22 / 150.79 ±1.22 / 152.86 ms │        147.87 / 148.81 ±0.96 / 150.56 ms │     no change │
│ QQuery 55 │        108.59 / 109.73 ±0.96 / 111.20 ms │        107.03 / 109.49 ±1.94 / 112.44 ms │     no change │
│ QQuery 56 │        143.75 / 145.64 ±2.31 / 149.96 ms │        141.76 / 143.28 ±1.17 / 145.25 ms │     no change │
│ QQuery 57 │        175.33 / 176.96 ±1.25 / 178.99 ms │        174.51 / 175.53 ±1.14 / 177.69 ms │     no change │
│ QQuery 58 │        292.64 / 303.73 ±7.17 / 315.05 ms │        293.38 / 299.04 ±4.98 / 306.64 ms │     no change │
│ QQuery 59 │        198.96 / 202.29 ±1.87 / 204.58 ms │        197.90 / 199.32 ±1.26 / 201.13 ms │     no change │
│ QQuery 60 │        144.38 / 145.72 ±0.76 / 146.61 ms │        141.16 / 144.52 ±2.15 / 147.88 ms │     no change │
│ QQuery 61 │           13.37 / 13.63 ±0.22 / 13.99 ms │           13.02 / 13.36 ±0.27 / 13.72 ms │     no change │
│ QQuery 62 │      906.65 / 992.66 ±68.35 / 1077.23 ms │       873.84 / 911.67 ±31.14 / 961.63 ms │ +1.09x faster │
│ QQuery 63 │        104.79 / 106.54 ±1.42 / 109.07 ms │        102.68 / 106.43 ±3.94 / 113.65 ms │     no change │
│ QQuery 64 │        685.57 / 691.70 ±5.49 / 700.15 ms │        688.68 / 692.41 ±3.78 / 699.65 ms │     no change │
│ QQuery 65 │        252.52 / 254.23 ±1.42 / 256.35 ms │        254.28 / 256.72 ±2.46 / 259.82 ms │     no change │
│ QQuery 66 │       238.25 / 253.54 ±13.33 / 278.05 ms │       237.11 / 249.85 ±11.62 / 267.04 ms │     no change │
│ QQuery 67 │        307.14 / 319.23 ±6.97 / 327.85 ms │        309.21 / 316.02 ±7.35 / 330.17 ms │     no change │
│ QQuery 68 │            8.68 / 10.27 ±0.97 / 11.66 ms │            9.44 / 10.15 ±0.81 / 11.40 ms │     no change │
│ QQuery 69 │        101.79 / 103.77 ±1.93 / 107.45 ms │        104.23 / 106.65 ±1.87 / 109.66 ms │     no change │
│ QQuery 70 │        347.49 / 353.65 ±7.67 / 368.64 ms │       330.85 / 343.40 ±16.46 / 375.52 ms │     no change │
│ QQuery 71 │        135.79 / 138.44 ±1.60 / 140.19 ms │        134.05 / 137.11 ±2.07 / 140.47 ms │     no change │
│ QQuery 72 │        621.31 / 625.95 ±4.72 / 634.77 ms │        612.92 / 626.05 ±9.64 / 641.30 ms │     no change │
│ QQuery 73 │              7.10 / 8.10 ±0.94 / 9.88 ms │             7.05 / 8.21 ±1.09 / 10.06 ms │     no change │
│ QQuery 74 │        560.57 / 566.53 ±5.52 / 573.97 ms │        538.53 / 544.29 ±3.29 / 548.35 ms │     no change │
│ QQuery 75 │        273.75 / 277.10 ±1.88 / 278.94 ms │        276.83 / 278.10 ±1.75 / 281.55 ms │     no change │
│ QQuery 76 │        133.44 / 134.73 ±0.87 / 136.03 ms │        132.01 / 133.11 ±1.11 / 134.98 ms │     no change │
│ QQuery 77 │        191.02 / 191.95 ±0.81 / 193.35 ms │        187.55 / 188.94 ±1.23 / 191.21 ms │     no change │
│ QQuery 78 │        345.16 / 347.60 ±2.24 / 351.04 ms │        341.07 / 343.08 ±1.54 / 344.95 ms │     no change │
│ QQuery 79 │        233.01 / 234.64 ±1.08 / 235.93 ms │        233.03 / 235.52 ±1.88 / 237.55 ms │     no change │
│ QQuery 80 │        324.22 / 325.13 ±0.89 / 326.44 ms │        323.00 / 324.54 ±1.77 / 327.98 ms │     no change │
│ QQuery 81 │           25.92 / 27.06 ±1.07 / 29.08 ms │           25.85 / 26.81 ±0.57 / 27.49 ms │     no change │
│ QQuery 82 │        199.62 / 201.24 ±1.55 / 203.14 ms │        198.71 / 200.22 ±1.23 / 202.00 ms │     no change │
│ QQuery 83 │           38.48 / 39.37 ±0.76 / 40.60 ms │           38.27 / 39.44 ±1.05 / 40.84 ms │     no change │
│ QQuery 84 │           49.05 / 49.82 ±0.95 / 51.69 ms │           48.34 / 48.69 ±0.25 / 49.09 ms │     no change │
│ QQuery 85 │        147.36 / 149.15 ±1.37 / 151.00 ms │        147.10 / 149.65 ±1.33 / 150.72 ms │     no change │
│ QQuery 86 │           39.15 / 40.60 ±0.96 / 41.89 ms │           39.37 / 39.67 ±0.20 / 40.00 ms │     no change │
│ QQuery 87 │           86.84 / 88.81 ±2.21 / 92.70 ms │           86.49 / 88.71 ±2.69 / 93.84 ms │     no change │
│ QQuery 88 │        100.15 / 101.01 ±0.68 / 101.80 ms │        101.20 / 101.87 ±0.47 / 102.39 ms │     no change │
│ QQuery 89 │        118.46 / 120.63 ±1.28 / 122.10 ms │        117.20 / 119.34 ±1.41 / 121.32 ms │     no change │
│ QQuery 90 │           23.42 / 24.05 ±0.40 / 24.50 ms │           23.19 / 23.97 ±0.54 / 24.86 ms │     no change │
│ QQuery 91 │           62.31 / 63.86 ±1.49 / 66.36 ms │           63.13 / 64.67 ±1.43 / 67.26 ms │     no change │
│ QQuery 92 │           57.21 / 58.28 ±0.98 / 59.82 ms │           56.98 / 57.80 ±0.54 / 58.29 ms │     no change │
│ QQuery 93 │        185.44 / 188.35 ±2.09 / 190.95 ms │        187.22 / 188.92 ±0.99 / 190.20 ms │     no change │
│ QQuery 94 │           61.78 / 62.18 ±0.68 / 63.53 ms │           61.08 / 62.20 ±0.72 / 63.30 ms │     no change │
│ QQuery 95 │        127.70 / 129.17 ±0.84 / 130.11 ms │        127.87 / 129.31 ±0.88 / 130.34 ms │     no change │
│ QQuery 96 │           72.84 / 74.77 ±1.32 / 76.90 ms │           72.03 / 74.83 ±1.71 / 77.39 ms │     no change │
│ QQuery 97 │        126.35 / 128.53 ±1.30 / 129.60 ms │        125.86 / 127.84 ±1.49 / 129.88 ms │     no change │
│ QQuery 98 │        157.45 / 158.04 ±0.53 / 158.90 ms │        154.69 / 156.17 ±0.91 / 157.16 ms │     no change │
│ QQuery 99 │ 10729.59 / 10766.67 ±23.07 / 10801.46 ms │ 10649.74 / 10710.41 ±40.88 / 10774.40 ms │     no change │
└───────────┴──────────────────────────────────────────┴──────────────────────────────────────────┴───────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Benchmark Summary                     ┃            ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ Total Time (HEAD)                     │ 31599.52ms │
│ Total Time (unwrap-cast-date-types)   │ 31284.46ms │
│ Average Time (HEAD)                   │   319.19ms │
│ Average Time (unwrap-cast-date-types) │   316.00ms │
│ 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 158.4s
Peak memory 5.6 GiB
Avg memory 4.6 GiB
CPU user 261.0s
CPU sys 17.5s
Peak spill 0 B

tpcds — branch

Metric Value
Wall time 156.7s
Peak memory 5.8 GiB
Avg memory 4.7 GiB
CPU user 259.0s
CPU sys 16.8s
Peak spill 0 B

File an issue against this benchmark runner

Add Date32 and Date64 to the supported numeric types in the existing
unwrap_cast_in_comparison optimizer. This allows filters like

  CAST(CAST(col AS Int32) AS Date32) >= Date32("2013-07-01")

to be simplified to

  col >= UInt16(15887)

eliminating per-row CAST operations. Date32 is internally i32 (days
since epoch) and Date64 is i64 (ms since epoch), so they participate
in numeric comparisons the same way as their integer counterparts.

This affects ClickBench Q36-Q42, which all filter on EventDate
(stored as UInt16, viewed as Date32). Each query previously evaluated
4 CAST operations per row; now it does 0.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Dandandan Dandandan force-pushed the unwrap-cast-date-types branch from 4d0268f to df0953c Compare April 16, 2026 05:59
@Dandandan
Copy link
Copy Markdown
Contributor Author

run benchmark clickbench_partitioned

@Dandandan
Copy link
Copy Markdown
Contributor Author

run benchmarks tpcds tpch

env:
  DATAFUSION_EXECUTION_PARQUET_PUSHDOWN_FILTERS: true
  DATAFUSION_EXECUTION_PARQUET_REORDER_FILTERS: true

@adriangbot
Copy link
Copy Markdown

🤖 Benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c4257702019-1340-zzvwf 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 unwrap-cast-date-types (df0953c) to 5c653be (merge-base) diff using: clickbench_partitioned
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-c4257710335-1342-d6pz2 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 unwrap-cast-date-types (df0953c) to 5c653be (merge-base) diff using: tpch
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-c4257710335-1341-7f5j7 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 unwrap-cast-date-types (df0953c) to 5c653be (merge-base) diff using: tpcds
Results will be posted here when complete


File an issue against this benchmark runner

@Dandandan
Copy link
Copy Markdown
Contributor Author

run benchmarks clickbench_partitioned

env:
  DATAFUSION_EXECUTION_PARQUET_PUSHDOWN_FILTERS: true
  DATAFUSION_EXECUTION_PARQUET_REORDER_FILTERS: true

@adriangbot
Copy link
Copy Markdown

🤖 Benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c4257739956-1343-hx2sk 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 unwrap-cast-date-types (df0953c) to 5c653be (merge-base) diff using: clickbench_partitioned
Results will be posted here when complete


File an issue against this benchmark runner

@Dandandan Dandandan marked this pull request as ready for review April 16, 2026 06:15
@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 unwrap-cast-date-types
--------------------
Benchmark clickbench_partitioned.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Query     ┃                                  HEAD ┃                unwrap-cast-date-types ┃        Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ QQuery 0  │          1.22 / 4.52 ±6.45 / 17.42 ms │          1.24 / 4.57 ±6.48 / 17.52 ms │     no change │
│ QQuery 1  │        14.34 / 14.74 ±0.24 / 15.03 ms │        14.62 / 14.87 ±0.15 / 15.06 ms │     no change │
│ QQuery 2  │        43.53 / 44.22 ±0.63 / 45.10 ms │        43.68 / 44.40 ±0.42 / 44.89 ms │     no change │
│ QQuery 3  │        40.13 / 43.18 ±3.01 / 48.73 ms │        43.35 / 45.57 ±1.38 / 46.91 ms │  1.06x slower │
│ QQuery 4  │     291.87 / 298.27 ±5.54 / 305.49 ms │     293.30 / 298.66 ±4.06 / 304.01 ms │     no change │
│ QQuery 5  │     352.11 / 353.77 ±1.08 / 355.11 ms │     350.07 / 354.77 ±4.63 / 363.44 ms │     no change │
│ QQuery 6  │          5.63 / 9.31 ±5.39 / 19.97 ms │           5.45 / 6.84 ±0.91 / 8.11 ms │ +1.36x faster │
│ QQuery 7  │        16.82 / 17.01 ±0.10 / 17.11 ms │        16.73 / 18.61 ±2.64 / 23.71 ms │  1.09x slower │
│ QQuery 8  │     431.36 / 440.26 ±5.97 / 449.52 ms │    417.34 / 432.92 ±12.22 / 452.85 ms │     no change │
│ QQuery 9  │    653.77 / 673.58 ±10.35 / 681.77 ms │    658.83 / 673.46 ±10.93 / 689.88 ms │     no change │
│ QQuery 10 │        91.64 / 94.32 ±1.90 / 97.47 ms │        91.81 / 94.19 ±2.08 / 97.78 ms │     no change │
│ QQuery 11 │     104.32 / 105.18 ±0.90 / 106.91 ms │     105.07 / 106.21 ±0.86 / 107.48 ms │     no change │
│ QQuery 12 │     338.63 / 346.15 ±3.80 / 348.93 ms │     352.99 / 358.42 ±7.32 / 372.35 ms │     no change │
│ QQuery 13 │     454.73 / 468.03 ±7.86 / 477.12 ms │    468.36 / 490.12 ±20.17 / 525.54 ms │     no change │
│ QQuery 14 │     349.35 / 351.33 ±1.78 / 353.45 ms │     353.90 / 355.60 ±0.94 / 356.49 ms │     no change │
│ QQuery 15 │    359.41 / 383.97 ±17.31 / 401.97 ms │    361.61 / 378.23 ±14.69 / 401.52 ms │     no change │
│ QQuery 16 │    718.62 / 752.80 ±30.53 / 809.55 ms │    733.48 / 748.01 ±12.84 / 765.43 ms │     no change │
│ QQuery 17 │    712.45 / 759.82 ±37.29 / 815.41 ms │     711.86 / 725.12 ±8.28 / 735.01 ms │     no change │
│ QQuery 18 │ 1457.05 / 1492.59 ±30.25 / 1529.66 ms │ 1420.14 / 1485.16 ±35.46 / 1524.59 ms │     no change │
│ QQuery 19 │       35.52 / 44.11 ±14.73 / 73.53 ms │        35.37 / 38.71 ±2.45 / 42.47 ms │ +1.14x faster │
│ QQuery 20 │    714.86 / 738.71 ±23.19 / 775.24 ms │    718.24 / 730.48 ±15.39 / 759.85 ms │     no change │
│ QQuery 21 │     766.75 / 777.13 ±9.18 / 792.22 ms │     770.17 / 781.76 ±7.24 / 791.66 ms │     no change │
│ QQuery 22 │  1136.90 / 1144.63 ±7.20 / 1157.07 ms │  1137.19 / 1141.45 ±4.02 / 1148.36 ms │     no change │
│ QQuery 23 │ 3104.41 / 3126.43 ±23.45 / 3169.57 ms │ 3080.98 / 3120.12 ±27.03 / 3148.67 ms │     no change │
│ QQuery 24 │     103.23 / 105.71 ±2.46 / 110.41 ms │     100.35 / 104.07 ±2.70 / 107.08 ms │     no change │
│ QQuery 25 │     138.69 / 141.10 ±2.20 / 144.22 ms │     140.47 / 141.20 ±0.48 / 141.68 ms │     no change │
│ QQuery 26 │     101.77 / 103.25 ±1.05 / 104.39 ms │     101.42 / 103.03 ±1.15 / 104.93 ms │     no change │
│ QQuery 27 │     847.14 / 854.93 ±9.47 / 872.30 ms │     848.53 / 855.06 ±5.02 / 861.81 ms │     no change │
│ QQuery 28 │ 3249.54 / 3286.83 ±19.83 / 3309.13 ms │ 3256.27 / 3283.50 ±18.76 / 3313.49 ms │     no change │
│ QQuery 29 │        50.80 / 55.58 ±2.87 / 59.69 ms │      51.75 / 89.62 ±65.32 / 219.79 ms │  1.61x slower │
│ QQuery 30 │     365.26 / 367.92 ±2.83 / 373.20 ms │     359.75 / 367.98 ±4.80 / 372.84 ms │     no change │
│ QQuery 31 │     377.03 / 387.86 ±7.91 / 400.37 ms │     397.25 / 405.73 ±6.29 / 413.25 ms │     no change │
│ QQuery 32 │ 1043.64 / 1066.55 ±22.05 / 1108.63 ms │ 1248.56 / 1276.32 ±21.86 / 1315.26 ms │  1.20x slower │
│ QQuery 33 │ 1475.68 / 1491.58 ±11.52 / 1510.46 ms │ 1497.09 / 1546.45 ±51.95 / 1631.65 ms │     no change │
│ QQuery 34 │ 1478.81 / 1494.99 ±11.32 / 1507.22 ms │ 1501.01 / 1513.40 ±13.05 / 1536.45 ms │     no change │
│ QQuery 35 │     402.33 / 412.13 ±7.31 / 423.81 ms │     402.26 / 410.17 ±9.95 / 429.65 ms │     no change │
│ QQuery 36 │     121.14 / 122.44 ±1.55 / 125.44 ms │     115.15 / 122.64 ±4.12 / 127.68 ms │     no change │
│ QQuery 37 │        50.02 / 51.95 ±3.08 / 58.09 ms │        48.01 / 48.96 ±1.06 / 50.83 ms │ +1.06x faster │
│ QQuery 38 │        75.45 / 78.17 ±2.58 / 81.89 ms │        74.67 / 77.28 ±1.31 / 78.10 ms │     no change │
│ QQuery 39 │     211.45 / 217.94 ±6.34 / 229.13 ms │     207.05 / 220.04 ±9.06 / 232.72 ms │     no change │
│ QQuery 40 │        24.34 / 27.62 ±1.87 / 29.67 ms │        22.14 / 25.76 ±2.27 / 28.71 ms │ +1.07x faster │
│ QQuery 41 │        20.81 / 22.13 ±1.17 / 24.20 ms │        20.08 / 22.50 ±1.44 / 24.22 ms │     no change │
│ QQuery 42 │        19.82 / 20.49 ±0.44 / 21.11 ms │        19.61 / 20.63 ±0.54 / 21.05 ms │     no change │
└───────────┴───────────────────────────────────────┴───────────────────────────────────────┴───────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Benchmark Summary                     ┃            ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ Total Time (HEAD)                     │ 22793.25ms │
│ Total Time (unwrap-cast-date-types)   │ 23082.60ms │
│ Average Time (HEAD)                   │   530.08ms │
│ Average Time (unwrap-cast-date-types) │   536.80ms │
│ Queries Faster                        │          4 │
│ Queries Slower                        │          4 │
│ Queries with No Change                │         35 │
│ Queries with Failure                  │          0 │
└───────────────────────────────────────┴────────────┘

Resource Usage

clickbench_partitioned — base (merge-base)

Metric Value
Wall time 115.0s
Peak memory 38.2 GiB
Avg memory 27.5 GiB
CPU user 1083.0s
CPU sys 88.9s
Peak spill 0 B

clickbench_partitioned — branch

Metric Value
Wall time 116.6s
Peak memory 43.2 GiB
Avg memory 29.5 GiB
CPU user 1085.0s
CPU sys 99.6s
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 unwrap-cast-date-types
--------------------
Benchmark clickbench_partitioned.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Query     ┃                                  HEAD ┃                unwrap-cast-date-types ┃        Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ QQuery 0  │          1.21 / 4.40 ±6.30 / 16.99 ms │          1.20 / 4.42 ±6.36 / 17.14 ms │     no change │
│ QQuery 1  │        15.45 / 16.02 ±0.31 / 16.30 ms │        15.59 / 15.97 ±0.29 / 16.47 ms │     no change │
│ QQuery 2  │        43.78 / 44.34 ±0.39 / 44.80 ms │        44.35 / 44.76 ±0.51 / 45.72 ms │     no change │
│ QQuery 3  │        43.69 / 45.27 ±1.07 / 46.28 ms │        41.18 / 45.40 ±3.52 / 49.81 ms │     no change │
│ QQuery 4  │     282.69 / 292.99 ±6.95 / 302.49 ms │    285.79 / 302.24 ±13.37 / 321.97 ms │     no change │
│ QQuery 5  │     339.02 / 346.25 ±6.21 / 356.31 ms │     344.85 / 349.46 ±4.65 / 356.99 ms │     no change │
│ QQuery 6  │          5.87 / 8.06 ±1.98 / 10.63 ms │           5.84 / 6.48 ±0.89 / 8.23 ms │ +1.24x faster │
│ QQuery 7  │        22.27 / 23.26 ±0.90 / 24.52 ms │        21.68 / 24.40 ±2.21 / 27.85 ms │     no change │
│ QQuery 8  │    400.27 / 415.58 ±15.82 / 436.42 ms │    422.47 / 436.88 ±12.16 / 458.08 ms │  1.05x slower │
│ QQuery 9  │     625.59 / 636.33 ±7.38 / 646.42 ms │     644.14 / 648.44 ±3.11 / 653.07 ms │     no change │
│ QQuery 10 │     119.85 / 123.51 ±3.49 / 128.45 ms │     117.77 / 122.71 ±3.89 / 129.75 ms │     no change │
│ QQuery 11 │     133.76 / 135.78 ±1.99 / 138.57 ms │     131.03 / 133.15 ±1.21 / 134.57 ms │     no change │
│ QQuery 12 │     375.34 / 381.28 ±5.02 / 387.98 ms │     373.95 / 379.48 ±3.71 / 383.41 ms │     no change │
│ QQuery 13 │     497.18 / 504.74 ±5.61 / 511.08 ms │    493.77 / 507.38 ±10.62 / 525.07 ms │     no change │
│ QQuery 14 │     373.79 / 380.64 ±3.99 / 386.31 ms │     388.15 / 390.64 ±1.79 / 392.90 ms │     no change │
│ QQuery 15 │     355.52 / 361.88 ±8.84 / 379.40 ms │    353.71 / 366.14 ±17.01 / 399.45 ms │     no change │
│ QQuery 16 │     711.58 / 719.21 ±9.04 / 733.29 ms │    718.22 / 732.57 ±10.57 / 747.17 ms │     no change │
│ QQuery 17 │     698.22 / 710.13 ±7.55 / 718.54 ms │    718.14 / 747.14 ±32.66 / 797.35 ms │  1.05x slower │
│ QQuery 18 │ 1397.57 / 1460.76 ±41.87 / 1522.36 ms │ 1447.48 / 1480.63 ±26.77 / 1506.42 ms │     no change │
│ QQuery 19 │       36.42 / 48.44 ±23.16 / 94.75 ms │        36.22 / 39.02 ±4.69 / 48.33 ms │ +1.24x faster │
│ QQuery 20 │    710.09 / 726.37 ±16.04 / 747.70 ms │    715.85 / 728.34 ±19.07 / 765.91 ms │     no change │
│ QQuery 21 │     714.43 / 729.73 ±9.98 / 740.46 ms │    726.08 / 746.28 ±11.22 / 759.23 ms │     no change │
│ QQuery 22 │ 1166.92 / 1185.22 ±15.34 / 1207.70 ms │ 1149.88 / 1170.77 ±19.56 / 1205.36 ms │     no change │
│ QQuery 23 │     251.56 / 261.06 ±5.77 / 267.50 ms │     264.78 / 269.69 ±4.56 / 277.59 ms │     no change │
│ QQuery 24 │       90.74 / 95.52 ±4.86 / 104.02 ms │       91.25 / 96.37 ±3.59 / 101.18 ms │     no change │
│ QQuery 25 │     176.67 / 179.22 ±1.92 / 182.52 ms │     174.13 / 179.16 ±3.69 / 184.77 ms │     no change │
│ QQuery 26 │     108.22 / 111.26 ±5.10 / 121.38 ms │     112.63 / 113.88 ±1.24 / 116.03 ms │     no change │
│ QQuery 27 │   974.35 / 987.69 ±15.52 / 1015.44 ms │   966.55 / 983.80 ±19.16 / 1015.22 ms │     no change │
│ QQuery 28 │ 3344.42 / 3393.16 ±25.09 / 3415.74 ms │ 3344.04 / 3387.04 ±25.55 / 3416.63 ms │     no change │
│ QQuery 29 │        49.76 / 54.06 ±4.88 / 63.26 ms │        51.28 / 55.33 ±5.19 / 64.91 ms │     no change │
│ QQuery 30 │     362.05 / 369.47 ±3.81 / 372.16 ms │     360.77 / 368.83 ±6.97 / 377.40 ms │     no change │
│ QQuery 31 │    348.76 / 361.94 ±13.87 / 387.32 ms │     352.97 / 361.33 ±8.78 / 377.53 ms │     no change │
│ QQuery 32 │ 1244.80 / 1302.58 ±53.08 / 1371.71 ms │ 1194.70 / 1253.18 ±58.71 / 1362.57 ms │     no change │
│ QQuery 33 │ 1470.35 / 1549.92 ±44.55 / 1592.84 ms │ 1459.99 / 1548.43 ±53.69 / 1604.75 ms │     no change │
│ QQuery 34 │ 1481.21 / 1500.74 ±18.68 / 1527.84 ms │ 1482.84 / 1502.08 ±12.15 / 1519.22 ms │     no change │
│ QQuery 35 │     379.52 / 382.90 ±2.56 / 386.98 ms │     375.97 / 386.25 ±6.80 / 397.33 ms │     no change │
│ QQuery 36 │     103.50 / 107.78 ±2.91 / 110.61 ms │      99.98 / 104.93 ±2.78 / 108.18 ms │     no change │
│ QQuery 37 │        52.74 / 55.64 ±1.91 / 58.23 ms │        52.01 / 55.97 ±3.80 / 62.09 ms │     no change │
│ QQuery 38 │        52.67 / 56.22 ±2.55 / 59.43 ms │        53.43 / 56.69 ±2.33 / 59.19 ms │     no change │
│ QQuery 39 │     170.80 / 177.48 ±5.93 / 188.19 ms │     165.55 / 174.49 ±5.91 / 181.49 ms │     no change │
│ QQuery 40 │        29.13 / 31.41 ±1.61 / 33.34 ms │        30.04 / 30.65 ±0.80 / 32.22 ms │     no change │
│ QQuery 41 │        25.78 / 28.15 ±1.93 / 31.53 ms │        25.54 / 26.54 ±1.27 / 28.78 ms │ +1.06x faster │
│ QQuery 42 │        21.29 / 21.86 ±0.43 / 22.40 ms │        21.00 / 22.07 ±0.65 / 22.81 ms │     no change │
└───────────┴───────────────────────────────────────┴───────────────────────────────────────┴───────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Benchmark Summary                     ┃            ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ Total Time (HEAD)                     │ 20328.22ms │
│ Total Time (unwrap-cast-date-types)   │ 20399.39ms │
│ Average Time (HEAD)                   │   472.75ms │
│ Average Time (unwrap-cast-date-types) │   474.40ms │
│ Queries Faster                        │          3 │
│ Queries Slower                        │          2 │
│ Queries with No Change                │         38 │
│ Queries with Failure                  │          0 │
└───────────────────────────────────────┴────────────┘

Resource Usage

clickbench_partitioned — base (merge-base)

Metric Value
Wall time 102.7s
Peak memory 41.1 GiB
Avg memory 28.6 GiB
CPU user 921.0s
CPU sys 100.6s
Peak spill 0 B

clickbench_partitioned — branch

Metric Value
Wall time 102.9s
Peak memory 35.2 GiB
Avg memory 27.2 GiB
CPU user 920.8s
CPU sys 102.0s
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 unwrap-cast-date-types
--------------------
Benchmark tpcds_sf1.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Query     ┃                                      HEAD ┃                    unwrap-cast-date-types ┃        Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ QQuery 1  │               6.60 / 7.11 ±0.78 / 8.65 ms │               6.40 / 6.88 ±0.76 / 8.40 ms │     no change │
│ QQuery 2  │        112.62 / 133.07 ±24.56 / 163.96 ms │        111.68 / 131.97 ±23.28 / 161.40 ms │     no change │
│ QQuery 3  │         108.79 / 110.78 ±1.26 / 112.76 ms │         109.03 / 109.78 ±0.39 / 110.18 ms │     no change │
│ QQuery 4  │     1101.27 / 1120.58 ±14.98 / 1143.79 ms │     1106.24 / 1132.13 ±13.43 / 1145.17 ms │     no change │
│ QQuery 5  │         189.02 / 198.62 ±5.51 / 205.75 ms │         197.26 / 202.38 ±4.08 / 207.61 ms │     no change │
│ QQuery 6  │         273.05 / 275.66 ±3.20 / 281.26 ms │        268.61 / 281.11 ±10.51 / 297.53 ms │     no change │
│ QQuery 7  │         330.27 / 335.87 ±4.90 / 343.91 ms │         344.71 / 348.09 ±2.49 / 351.94 ms │     no change │
│ QQuery 8  │         156.74 / 164.76 ±4.87 / 171.48 ms │         163.16 / 166.38 ±2.69 / 171.30 ms │     no change │
│ QQuery 9  │        228.78 / 244.22 ±12.29 / 260.32 ms │         248.56 / 253.52 ±3.98 / 259.67 ms │     no change │
│ QQuery 10 │         173.05 / 180.81 ±4.93 / 185.89 ms │         179.90 / 187.24 ±6.15 / 198.30 ms │     no change │
│ QQuery 11 │         730.22 / 738.85 ±8.64 / 749.55 ms │         756.05 / 763.71 ±6.21 / 771.98 ms │     no change │
│ QQuery 12 │            38.38 / 39.08 ±0.72 / 40.12 ms │            39.37 / 40.63 ±1.00 / 41.88 ms │     no change │
│ QQuery 13 │        561.78 / 577.59 ±12.94 / 594.72 ms │         575.77 / 587.54 ±9.37 / 602.22 ms │     no change │
│ QQuery 14 │        900.67 / 923.63 ±17.86 / 954.45 ms │         919.04 / 925.07 ±3.58 / 929.34 ms │     no change │
│ QQuery 15 │            20.66 / 22.11 ±1.60 / 24.89 ms │            19.82 / 21.72 ±2.30 / 25.96 ms │     no change │
│ QQuery 16 │               7.12 / 7.69 ±0.63 / 8.84 ms │               7.44 / 7.74 ±0.23 / 8.11 ms │     no change │
│ QQuery 17 │         207.03 / 207.99 ±1.18 / 210.20 ms │         204.04 / 210.54 ±3.75 / 214.46 ms │     no change │
│ QQuery 18 │        440.60 / 478.50 ±19.42 / 495.36 ms │        315.13 / 399.37 ±79.22 / 503.86 ms │ +1.20x faster │
│ QQuery 19 │         141.75 / 145.51 ±2.04 / 147.87 ms │         143.40 / 146.11 ±2.82 / 151.44 ms │     no change │
│ QQuery 20 │            16.72 / 17.30 ±0.98 / 19.26 ms │            17.14 / 18.51 ±1.17 / 20.03 ms │  1.07x slower │
│ QQuery 21 │            27.43 / 28.48 ±0.66 / 29.19 ms │            27.85 / 28.65 ±0.64 / 29.69 ms │     no change │
│ QQuery 22 │         517.07 / 524.33 ±6.05 / 533.34 ms │         528.37 / 538.95 ±5.64 / 544.34 ms │     no change │
│ QQuery 23 │      1232.70 / 1247.45 ±9.07 / 1261.11 ms │      1233.61 / 1238.66 ±2.88 / 1242.47 ms │     no change │
│ QQuery 24 │         124.60 / 126.72 ±3.02 / 132.71 ms │         125.26 / 127.38 ±2.11 / 130.91 ms │     no change │
│ QQuery 25 │         303.19 / 307.28 ±2.49 / 310.02 ms │         300.93 / 305.50 ±2.44 / 308.27 ms │     no change │
│ QQuery 26 │        140.04 / 154.72 ±10.25 / 168.34 ms │         146.62 / 151.72 ±4.53 / 158.58 ms │     no change │
│ QQuery 27 │               7.09 / 7.90 ±0.55 / 8.47 ms │               6.99 / 7.64 ±0.42 / 8.27 ms │     no change │
│ QQuery 28 │         219.50 / 229.63 ±7.03 / 239.71 ms │         224.83 / 230.51 ±3.95 / 235.58 ms │     no change │
│ QQuery 29 │         245.61 / 250.86 ±3.71 / 256.10 ms │         244.81 / 248.84 ±2.61 / 251.98 ms │     no change │
│ QQuery 30 │            58.17 / 60.70 ±2.30 / 64.00 ms │            56.08 / 59.04 ±2.79 / 64.31 ms │     no change │
│ QQuery 31 │         173.27 / 180.07 ±4.60 / 186.26 ms │         174.14 / 181.82 ±4.30 / 186.32 ms │     no change │
│ QQuery 32 │            53.28 / 55.21 ±1.09 / 56.52 ms │            54.48 / 56.09 ±1.02 / 57.50 ms │     no change │
│ QQuery 33 │         128.34 / 133.56 ±2.73 / 136.39 ms │         132.27 / 134.09 ±1.26 / 135.87 ms │     no change │
│ QQuery 34 │               7.10 / 7.30 ±0.23 / 7.76 ms │               7.26 / 7.50 ±0.17 / 7.79 ms │     no change │
│ QQuery 35 │         147.46 / 152.27 ±3.00 / 156.61 ms │         145.62 / 153.45 ±4.10 / 156.95 ms │     no change │
│ QQuery 36 │               6.59 / 6.73 ±0.09 / 6.83 ms │               6.49 / 6.78 ±0.29 / 7.30 ms │     no change │
│ QQuery 37 │               4.40 / 4.67 ±0.18 / 4.96 ms │               4.34 / 4.71 ±0.32 / 5.26 ms │     no change │
│ QQuery 38 │         101.91 / 111.39 ±5.81 / 119.91 ms │         109.92 / 112.27 ±1.57 / 114.71 ms │     no change │
│ QQuery 39 │         143.74 / 146.45 ±1.83 / 148.55 ms │         137.28 / 139.84 ±3.14 / 145.96 ms │     no change │
│ QQuery 40 │         143.14 / 147.87 ±6.27 / 160.20 ms │         138.80 / 143.55 ±6.23 / 155.68 ms │     no change │
│ QQuery 41 │            14.65 / 15.69 ±0.60 / 16.34 ms │            14.23 / 15.02 ±0.85 / 16.56 ms │     no change │
│ QQuery 42 │         109.55 / 113.05 ±3.42 / 119.26 ms │         110.44 / 114.92 ±3.23 / 118.67 ms │     no change │
│ QQuery 43 │               6.21 / 6.30 ±0.12 / 6.51 ms │               5.71 / 6.38 ±0.78 / 7.89 ms │     no change │
│ QQuery 44 │            12.25 / 13.41 ±0.99 / 14.61 ms │            11.80 / 12.83 ±0.87 / 14.15 ms │     no change │
│ QQuery 45 │            46.79 / 49.33 ±2.06 / 52.23 ms │            44.50 / 47.16 ±2.18 / 50.20 ms │     no change │
│ QQuery 46 │               8.93 / 9.30 ±0.26 / 9.56 ms │               8.44 / 8.70 ±0.24 / 9.04 ms │ +1.07x faster │
│ QQuery 47 │         855.10 / 866.48 ±7.38 / 875.27 ms │        803.65 / 820.63 ±11.99 / 836.73 ms │ +1.06x faster │
│ QQuery 48 │         494.73 / 507.01 ±7.45 / 516.60 ms │        481.42 / 500.48 ±13.12 / 519.36 ms │     no change │
│ QQuery 49 │         281.74 / 290.33 ±5.01 / 297.05 ms │         282.91 / 292.02 ±5.88 / 300.02 ms │     no change │
│ QQuery 50 │         555.75 / 564.65 ±6.25 / 572.96 ms │         543.02 / 551.51 ±6.85 / 560.30 ms │     no change │
│ QQuery 51 │         217.12 / 224.09 ±3.65 / 227.09 ms │         213.36 / 219.79 ±3.28 / 222.66 ms │     no change │
│ QQuery 52 │         113.10 / 115.83 ±2.18 / 119.16 ms │         112.13 / 116.05 ±2.87 / 119.48 ms │     no change │
│ QQuery 53 │         141.46 / 146.57 ±3.50 / 149.94 ms │         144.91 / 147.24 ±1.52 / 149.06 ms │     no change │
│ QQuery 54 │         130.09 / 132.57 ±2.94 / 138.32 ms │         127.82 / 132.67 ±3.84 / 138.91 ms │     no change │
│ QQuery 55 │         109.27 / 113.27 ±2.66 / 116.88 ms │         110.99 / 114.24 ±2.65 / 117.04 ms │     no change │
│ QQuery 56 │         134.69 / 136.94 ±3.36 / 143.52 ms │         134.00 / 135.04 ±1.64 / 138.31 ms │     no change │
│ QQuery 57 │         194.72 / 197.54 ±2.26 / 200.19 ms │         188.81 / 191.89 ±2.76 / 196.02 ms │     no change │
│ QQuery 58 │         373.18 / 378.53 ±4.40 / 384.60 ms │        365.20 / 380.33 ±11.37 / 398.60 ms │     no change │
│ QQuery 59 │         278.82 / 283.68 ±2.44 / 285.38 ms │         281.77 / 284.36 ±2.27 / 286.94 ms │     no change │
│ QQuery 60 │         140.57 / 142.11 ±2.25 / 146.58 ms │         137.21 / 141.89 ±2.89 / 144.84 ms │     no change │
│ QQuery 61 │            12.51 / 13.07 ±0.45 / 13.72 ms │            12.71 / 13.28 ±0.77 / 14.79 ms │     no change │
│ QQuery 62 │       930.14 / 967.11 ±31.17 / 1007.45 ms │      971.46 / 1029.71 ±30.57 / 1054.40 ms │  1.06x slower │
│ QQuery 63 │         140.49 / 149.76 ±5.24 / 156.46 ms │         138.03 / 149.39 ±6.32 / 155.52 ms │     no change │
│ QQuery 64 │ 27740.90 / 28085.76 ±388.29 / 28797.71 ms │ 28401.11 / 29087.24 ±659.54 / 30257.07 ms │     no change │
│ QQuery 65 │         370.60 / 377.06 ±5.65 / 386.33 ms │         363.30 / 370.66 ±8.22 / 386.43 ms │     no change │
│ QQuery 66 │         198.99 / 202.90 ±3.21 / 206.47 ms │         191.59 / 198.80 ±4.79 / 204.17 ms │     no change │
│ QQuery 67 │        513.02 / 528.15 ±13.11 / 549.83 ms │         516.72 / 524.01 ±6.08 / 532.89 ms │     no change │
│ QQuery 68 │             8.55 / 10.68 ±2.64 / 15.75 ms │             8.69 / 10.92 ±1.62 / 12.74 ms │     no change │
│ QQuery 69 │         168.91 / 179.87 ±6.40 / 188.44 ms │         172.74 / 182.67 ±6.63 / 192.17 ms │     no change │
│ QQuery 70 │         432.75 / 441.30 ±6.29 / 448.44 ms │         430.23 / 443.05 ±8.70 / 456.94 ms │     no change │
│ QQuery 71 │         131.03 / 133.33 ±1.80 / 135.65 ms │         127.81 / 133.81 ±4.47 / 139.71 ms │     no change │
│ QQuery 72 │      1194.01 / 1202.92 ±6.84 / 1212.06 ms │     1187.64 / 1198.32 ±10.35 / 1218.09 ms │     no change │
│ QQuery 73 │               6.84 / 7.52 ±0.56 / 8.34 ms │               7.14 / 7.89 ±0.89 / 9.64 ms │     no change │
│ QQuery 74 │         513.51 / 520.70 ±5.01 / 528.45 ms │         499.12 / 514.02 ±7.76 / 521.05 ms │     no change │
│ QQuery 75 │         280.74 / 287.82 ±4.50 / 292.11 ms │         282.36 / 286.42 ±3.71 / 292.44 ms │     no change │
│ QQuery 76 │         271.55 / 283.75 ±6.71 / 291.54 ms │         268.26 / 277.10 ±5.93 / 284.90 ms │     no change │
│ QQuery 77 │         226.17 / 229.43 ±3.12 / 234.78 ms │         228.36 / 230.75 ±2.42 / 234.29 ms │     no change │
│ QQuery 78 │         309.10 / 310.55 ±1.14 / 312.54 ms │         310.38 / 312.69 ±1.83 / 315.75 ms │     no change │
│ QQuery 79 │         262.92 / 264.43 ±1.18 / 266.48 ms │         259.45 / 262.97 ±2.53 / 265.98 ms │     no change │
│ QQuery 80 │         326.17 / 328.80 ±3.29 / 335.20 ms │         324.15 / 328.59 ±3.25 / 333.88 ms │     no change │
│ QQuery 81 │            33.31 / 34.54 ±1.52 / 37.41 ms │            31.47 / 33.32 ±1.18 / 34.99 ms │     no change │
│ QQuery 82 │         190.44 / 198.22 ±4.23 / 202.07 ms │         190.29 / 194.70 ±3.73 / 200.30 ms │     no change │
│ QQuery 83 │            46.31 / 47.91 ±1.36 / 50.04 ms │            46.11 / 47.29 ±1.09 / 48.97 ms │     no change │
│ QQuery 84 │            65.34 / 69.83 ±7.05 / 83.87 ms │            66.15 / 67.18 ±0.66 / 67.92 ms │     no change │
│ QQuery 85 │        264.95 / 285.04 ±10.31 / 293.47 ms │         280.39 / 286.37 ±3.96 / 292.29 ms │     no change │
│ QQuery 86 │            48.67 / 51.99 ±2.31 / 54.67 ms │            49.79 / 52.56 ±2.37 / 56.28 ms │     no change │
│ QQuery 87 │         106.53 / 113.19 ±4.06 / 117.14 ms │         109.75 / 111.95 ±2.26 / 115.13 ms │     no change │
│ QQuery 88 │         130.51 / 135.26 ±2.69 / 138.13 ms │         131.55 / 134.53 ±3.12 / 139.35 ms │     no change │
│ QQuery 89 │         151.85 / 159.24 ±5.67 / 169.10 ms │         151.87 / 157.97 ±4.76 / 164.82 ms │     no change │
│ QQuery 90 │            25.73 / 26.92 ±0.80 / 28.18 ms │            26.45 / 28.84 ±2.03 / 32.13 ms │  1.07x slower │
│ QQuery 91 │          98.41 / 105.63 ±4.66 / 111.30 ms │          99.90 / 107.59 ±4.16 / 112.52 ms │     no change │
│ QQuery 92 │            53.82 / 55.31 ±0.99 / 56.91 ms │            53.79 / 54.98 ±0.97 / 56.47 ms │     no change │
│ QQuery 93 │         187.76 / 190.75 ±1.69 / 192.71 ms │         185.33 / 190.32 ±3.46 / 195.37 ms │     no change │
│ QQuery 94 │            63.91 / 65.45 ±1.56 / 68.34 ms │            64.55 / 65.85 ±1.21 / 68.07 ms │     no change │
│ QQuery 95 │         144.12 / 146.17 ±1.44 / 148.34 ms │         141.99 / 144.75 ±2.38 / 148.74 ms │     no change │
│ QQuery 96 │            77.43 / 88.01 ±5.36 / 91.36 ms │            83.62 / 88.45 ±2.74 / 91.46 ms │     no change │
│ QQuery 97 │         151.87 / 155.03 ±2.01 / 157.90 ms │         152.60 / 155.88 ±2.45 / 158.21 ms │     no change │
│ QQuery 98 │         120.49 / 124.63 ±2.37 / 127.67 ms │         117.64 / 122.63 ±2.94 / 125.55 ms │     no change │
│ QQuery 99 │  10822.83 / 10851.02 ±24.60 / 10885.68 ms │  10867.29 / 10908.91 ±41.03 / 10980.06 ms │     no change │
└───────────┴───────────────────────────────────────────┴───────────────────────────────────────────┴───────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Benchmark Summary                     ┃            ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ Total Time (HEAD)                     │ 61549.04ms │
│ Total Time (unwrap-cast-date-types)   │ 62566.95ms │
│ Average Time (HEAD)                   │   621.71ms │
│ Average Time (unwrap-cast-date-types) │   631.99ms │
│ Queries Faster                        │          3 │
│ Queries Slower                        │          3 │
│ Queries with No Change                │         93 │
│ Queries with Failure                  │          0 │
└───────────────────────────────────────┴────────────┘

Resource Usage

tpcds — base (merge-base)

Metric Value
Wall time 308.2s
Peak memory 37.4 GiB
Avg memory 25.8 GiB
CPU user 604.4s
CPU sys 27.5s
Peak spill 0 B

tpcds — branch

Metric Value
Wall time 313.3s
Peak memory 34.4 GiB
Avg memory 24.7 GiB
CPU user 612.2s
CPU sys 28.8s
Peak spill 0 B

File an issue against this benchmark runner

| DataType::Decimal32(_, _)
| DataType::Decimal64(_, _)
| DataType::Decimal128(_, _)
| DataType::Timestamp(_, _)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is a different use case but similar to the current one: Is something similar needed also for other temporal types missing here (like Duration and Interval for example) ?


// Date↔Timestamp casts are lossy (drop time-of-day or add midnight),
// so unwrapping would change comparison semantics.
if (is_date_type(&lit_data_type) && target_type.is_temporal())
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment is about Data<->Timestamp casts but this includes other temporal types like Duration and Interval. Maybe the comment should be extended.

But this also would prevent casting from Date32 to Date64. I think this might be desirable by someone.

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

Labels

logical-expr Logical plan and expressions sqllogictest SQL Logic Tests (.slt)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants