Skip to content

perf: preserve dictionary encoding through regexp_replace - #26186

Draft
Rich-T-kid wants to merge 2 commits into
apache:mainfrom
Rich-T-kid:rich-T-kid/regexp-replace-dict-encoding
Draft

Rich-T-kid wants to merge 2 commits into
apache:mainfrom
Rich-T-kid:rich-T-kid/regexp-replace-dict-encoding

Conversation

@Rich-T-kid

@Rich-T-kid Rich-T-kid commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Rationale for this change

Preserves Dictionary encoding on the input column by running regexp_replace over the dict's unique values and reusing the keys, avoiding the full materialization that previously happened when the column was dict-encoded.

What changes are included in this PR?

  • Signature switched to user_defined with coerce_types that keeps Dictionary on arg[0].
  • return_type / return_field_from_args carry the dict wrapper through, dropping it only when the other args are arrays (keys can't round-trip).
  • invoke_with_args runs the regex on dict.values() and re-attaches the keys;

What is the testing strategy for this PR?

added one sqllogictest in
datafusion/sqllogictest/test_files/regexp/regexp_replace.slt that
asserts arrow_typeof(regexp_replace(dict_col, pattern, replacement))
returns Dictionary(Int32, Utf8). Existing regex / string sqllogictests
and the regexp_replace unit tests still pass unchanged.

Are there any user-facing changes?

no

@github-actions github-actions Bot added sqllogictest SQL Logic Tests (.slt) functions Changes to functions implementation labels Oct 10, 2026
@Rich-T-kid
Rich-T-kid force-pushed the rich-T-kid/regexp-replace-dict-encoding branch from 70cbf41 to 62e3ba4 Compare October 10, 2026 17:41
@codecov-commenter

codecov-commenter commented Oct 10, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 85.52632% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.89%. Comparing base (334f293) to head (80bd16e).
⚠️ Report is 88 commits behind head on main.

Files with missing lines Patch % Lines
datafusion/functions/src/regex/regexpreplace.rs 85.52% 5 Missing and 6 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #26186      +/-   ##
==========================================
+ Coverage   82.79%   82.89%   +0.10%     
==========================================
  Files        1149     1154       +5     
  Lines      451645   458074    +6429     
  Branches   451645   458074    +6429     
==========================================
+ Hits       373940   379731    +5791     
- Misses      54929    55298     +369     
- Partials    22776    23045     +269     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Keep Dictionary(_, Utf8/LargeUtf8/Utf8View) through regexp_replace
instead of casting it to the inner string type. When the pattern,
replacement, and flags args are all scalar the function runs on the
dict values and re-attaches the keys; otherwise it falls back to a
flat value-type output.
@Rich-T-kid
Rich-T-kid force-pushed the rich-T-kid/regexp-replace-dict-encoding branch from 62e3ba4 to 7a2ee99 Compare October 12, 2026 03:33
@Rich-T-kid

Copy link
Copy Markdown
Contributor Author

run benchmark tpch tpcds clickbench_partitioned wide_schema
env:
DATAFUSION_RUNTIME_MEMORY_LIMIT: "32G"
baseline:
env:
DATAFUSION_EXECUTION_PARQUET_ENABLE_RLE_TO_DICTIONARY: "true"
changed:
env:
DATAFUSION_EXECUTION_PARQUET_ENABLE_RLE_TO_DICTIONARY: "true"

@Rich-T-kid

Copy link
Copy Markdown
Contributor Author

run benchmark clickbench_partitioned
env:
DATAFUSION_RUNTIME_MEMORY_LIMIT: "32G"
baseline:
env:
DATAFUSION_EXECUTION_PARQUET_ENABLE_RLE_TO_DICTIONARY: "false"
changed:
env:
DATAFUSION_EXECUTION_PARQUET_ENABLE_RLE_TO_DICTIONARY: "true"

@Rich-T-kid
Rich-T-kid marked this pull request as ready for review October 12, 2026 03:52
@adriangbot

Copy link
Copy Markdown

🤖 Benchmark running (GKE) | trigger
Instance: c4a-highcpu-48 (12 vCPU / 65 GiB) | Linux bench-c6117396336-3317-d74m2 6.12.94+ #1 SMP Fri Aug 21 08:00:16 UTC 2026 aarch64 GNU/Linux

CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  48
On-line CPU(s) list:                     0-47
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     48
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:                               3 MiB (48 instances)
L1i cache:                               3 MiB (48 instances)
L2 cache:                                96 MiB (48 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-47
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 rich-T-kid/regexp-replace-dict-encoding (7a2ee99) to 334f293 (merge-base) diff

Run configuration
run benchmark clickbench_partitioned
env:
  DATAFUSION_RUNTIME_MEMORY_LIMIT: "32G"
baseline:
  env:
    DATAFUSION_EXECUTION_PARQUET_ENABLE_RLE_TO_DICTIONARY: "true"
changed:
  env:
    DATAFUSION_EXECUTION_PARQUET_ENABLE_RLE_TO_DICTIONARY: "true"

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-highcpu-48 (12 vCPU / 65 GiB) | Linux bench-c6117396336-3318-xzxvc 6.12.94+ #1 SMP Fri Aug 21 08:00:16 UTC 2026 aarch64 GNU/Linux

CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  48
On-line CPU(s) list:                     0-47
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     48
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:                               3 MiB (48 instances)
L1i cache:                               3 MiB (48 instances)
L2 cache:                                96 MiB (48 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-47
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 rich-T-kid/regexp-replace-dict-encoding (7a2ee99) to 334f293 (merge-base) diff

Run configuration
run benchmark wide_schema
env:
  DATAFUSION_RUNTIME_MEMORY_LIMIT: "32G"
baseline:
  env:
    DATAFUSION_EXECUTION_PARQUET_ENABLE_RLE_TO_DICTIONARY: "true"
changed:
  env:
    DATAFUSION_EXECUTION_PARQUET_ENABLE_RLE_TO_DICTIONARY: "true"

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-highcpu-48 (12 vCPU / 65 GiB) | Linux bench-c6117396336-3315-rgrw8 6.12.94+ #1 SMP Fri Aug 21 08:00:16 UTC 2026 aarch64 GNU/Linux

CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  48
On-line CPU(s) list:                     0-47
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     48
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:                               3 MiB (48 instances)
L1i cache:                               3 MiB (48 instances)
L2 cache:                                96 MiB (48 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-47
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 rich-T-kid/regexp-replace-dict-encoding (7a2ee99) to 334f293 (merge-base) diff

Run configuration
run benchmark tpch
env:
  DATAFUSION_RUNTIME_MEMORY_LIMIT: "32G"
baseline:
  env:
    DATAFUSION_EXECUTION_PARQUET_ENABLE_RLE_TO_DICTIONARY: "true"
changed:
  env:
    DATAFUSION_EXECUTION_PARQUET_ENABLE_RLE_TO_DICTIONARY: "true"

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-highcpu-48 (12 vCPU / 65 GiB) | Linux bench-c6117396336-3316-6fj4v 6.12.94+ #1 SMP Fri Aug 21 08:00:16 UTC 2026 aarch64 GNU/Linux

CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  48
On-line CPU(s) list:                     0-47
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     48
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:                               3 MiB (48 instances)
L1i cache:                               3 MiB (48 instances)
L2 cache:                                96 MiB (48 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-47
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 rich-T-kid/regexp-replace-dict-encoding (7a2ee99) to 334f293 (merge-base) diff

Run configuration
run benchmark tpcds
env:
  DATAFUSION_RUNTIME_MEMORY_LIMIT: "32G"
baseline:
  env:
    DATAFUSION_EXECUTION_PARQUET_ENABLE_RLE_TO_DICTIONARY: "true"
changed:
  env:
    DATAFUSION_EXECUTION_PARQUET_ENABLE_RLE_TO_DICTIONARY: "true"

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-highcpu-48 (12 vCPU / 65 GiB) | Linux bench-c6117403127-3319-n8lz8 6.12.94+ #1 SMP Fri Aug 21 08:00:16 UTC 2026 aarch64 GNU/Linux

CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  48
On-line CPU(s) list:                     0-47
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     48
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:                               3 MiB (48 instances)
L1i cache:                               3 MiB (48 instances)
L2 cache:                                96 MiB (48 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-47
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 rich-T-kid/regexp-replace-dict-encoding (7a2ee99) to 334f293 (merge-base) diff

Run configuration
run benchmark clickbench_partitioned
env:
  DATAFUSION_RUNTIME_MEMORY_LIMIT: "32G"
baseline:
  env:
    DATAFUSION_EXECUTION_PARQUET_ENABLE_RLE_TO_DICTIONARY: "false"
changed:
  env:
    DATAFUSION_EXECUTION_PARQUET_ENABLE_RLE_TO_DICTIONARY: "true"

Results will be posted here when complete


File an issue against this benchmark runner

@Rich-T-kid

Copy link
Copy Markdown
Contributor Author

forgot to flip the flag , re-running the last one

@Rich-T-kid

Copy link
Copy Markdown
Contributor Author

run benchmark clickbench_partitioned
env:
DATAFUSION_RUNTIME_MEMORY_LIMIT: "32G"
baseline:
env:
DATAFUSION_EXECUTION_PARQUET_ENABLE_RLE_TO_DICTIONARY: "true"
changed:
env:
DATAFUSION_EXECUTION_PARQUET_ENABLE_RLE_TO_DICTIONARY: "true"

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark completed (GKE) | trigger

Instance: c4a-highcpu-48 (12 vCPU / 65 GiB)

Comparing rich-T-kid/regexp-replace-dict-encoding (7a2ee99) to 334f293 (merge-base) diff

Run configuration
run benchmark tpch
env:
  DATAFUSION_RUNTIME_MEMORY_LIMIT: "32G"
baseline:
  env:
    DATAFUSION_EXECUTION_PARQUET_ENABLE_RLE_TO_DICTIONARY: "true"
changed:
  env:
    DATAFUSION_EXECUTION_PARQUET_ENABLE_RLE_TO_DICTIONARY: "true"
CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  48
On-line CPU(s) list:                     0-47
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     48
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:                               3 MiB (48 instances)
L1i cache:                               3 MiB (48 instances)
L2 cache:                                96 MiB (48 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-47
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 rich-T-kid_regexp-replace-dict-encoding
--------------------
Benchmark tpch_sf1.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┓
┃ Query     ┃     HEAD ┃ rich-T-kid_regexp-replace-dict-encoding ┃    Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━┩
│ QQuery 1  │ 39.62 ms │                                39.48 ms │ no change │
│ QQuery 2  │ 18.28 ms │                                18.26 ms │ no change │
│ QQuery 3  │ 27.81 ms │                                27.76 ms │ no change │
│ QQuery 4  │ 16.48 ms │                                16.46 ms │ no change │
│ QQuery 5  │ 34.48 ms │                                34.59 ms │ no change │
│ QQuery 6  │ 13.05 ms │                                13.10 ms │ no change │
│ QQuery 7  │ 40.31 ms │                                41.15 ms │ no change │
│ QQuery 8  │ 40.30 ms │                                40.20 ms │ no change │
│ QQuery 9  │ 50.60 ms │                                49.93 ms │ no change │
│ QQuery 10 │ 57.78 ms │                                57.37 ms │ no change │
│ QQuery 11 │ 12.97 ms │                                13.00 ms │ no change │
│ QQuery 12 │ 20.31 ms │                                20.58 ms │ no change │
│ QQuery 13 │ 45.19 ms │                                44.78 ms │ no change │
│ QQuery 14 │ 23.44 ms │                                23.62 ms │ no change │
│ QQuery 15 │ 29.89 ms │                                29.88 ms │ no change │
│ QQuery 16 │ 13.42 ms │                                13.40 ms │ no change │
│ QQuery 17 │ 72.78 ms │                                72.72 ms │ no change │
│ QQuery 18 │ 66.40 ms │                                68.69 ms │ no change │
│ QQuery 19 │ 28.85 ms │                                28.87 ms │ no change │
│ QQuery 20 │ 33.02 ms │                                33.05 ms │ no change │
│ QQuery 21 │ 50.71 ms │                                50.81 ms │ no change │
│ QQuery 22 │ 14.91 ms │                                14.95 ms │ no change │
└───────────┴──────────┴─────────────────────────────────────────┴───────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━┓
┃ Benchmark Summary                                      ┃          ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━┩
│ Total Time (HEAD)                                      │ 750.60ms │
│ Total Time (rich-T-kid_regexp-replace-dict-encoding)   │ 752.65ms │
│ Average Time (HEAD)                                    │  34.12ms │
│ Average Time (rich-T-kid_regexp-replace-dict-encoding) │  34.21ms │
│ Queries Faster                                         │        0 │
│ Queries Slower                                         │        0 │
│ Queries with No Change                                 │       22 │
│ Queries with Failure                                   │        0 │
└────────────────────────────────────────────────────────┴──────────┘

Distribution per query (min / mean ±stddev / max):

Comparing HEAD and rich-T-kid_regexp-replace-dict-encoding
--------------------
Benchmark tpch_sf1.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┓
┃ Query     ┃                           HEAD ┃ rich-T-kid_regexp-replace-dict-encoding ┃    Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━┩
│ QQuery 1  │ 39.62 / 40.57 ±1.07 / 42.66 ms │          39.48 / 40.15 ±1.10 / 42.34 ms │ no change │
│ QQuery 2  │ 18.28 / 18.57 ±0.35 / 19.23 ms │          18.26 / 18.48 ±0.30 / 19.08 ms │ no change │
│ QQuery 3  │ 27.81 / 28.02 ±0.21 / 28.38 ms │          27.76 / 27.84 ±0.06 / 27.91 ms │ no change │
│ QQuery 4  │ 16.48 / 16.69 ±0.18 / 17.00 ms │          16.46 / 16.65 ±0.21 / 16.97 ms │ no change │
│ QQuery 5  │ 34.48 / 34.75 ±0.17 / 34.93 ms │          34.59 / 34.82 ±0.26 / 35.30 ms │ no change │
│ QQuery 6  │ 13.05 / 13.15 ±0.11 / 13.35 ms │          13.10 / 13.27 ±0.19 / 13.63 ms │ no change │
│ QQuery 7  │ 40.31 / 42.74 ±1.67 / 44.50 ms │          41.15 / 42.30 ±1.07 / 44.28 ms │ no change │
│ QQuery 8  │ 40.30 / 41.21 ±1.15 / 43.41 ms │          40.20 / 40.54 ±0.21 / 40.76 ms │ no change │
│ QQuery 9  │ 50.60 / 51.23 ±0.63 / 52.37 ms │          49.93 / 50.65 ±0.56 / 51.43 ms │ no change │
│ QQuery 10 │ 57.78 / 57.95 ±0.21 / 58.33 ms │          57.37 / 57.86 ±0.31 / 58.31 ms │ no change │
│ QQuery 11 │ 12.97 / 13.14 ±0.17 / 13.48 ms │          13.00 / 13.30 ±0.22 / 13.56 ms │ no change │
│ QQuery 12 │ 20.31 / 20.54 ±0.15 / 20.70 ms │          20.58 / 20.99 ±0.34 / 21.61 ms │ no change │
│ QQuery 13 │ 45.19 / 45.38 ±0.17 / 45.65 ms │          44.78 / 45.27 ±0.50 / 46.24 ms │ no change │
│ QQuery 14 │ 23.44 / 23.64 ±0.14 / 23.85 ms │          23.62 / 23.78 ±0.19 / 24.15 ms │ no change │
│ QQuery 15 │ 29.89 / 30.07 ±0.20 / 30.47 ms │          29.88 / 30.14 ±0.23 / 30.51 ms │ no change │
│ QQuery 16 │ 13.42 / 13.69 ±0.22 / 14.07 ms │          13.40 / 13.55 ±0.16 / 13.79 ms │ no change │
│ QQuery 17 │ 72.78 / 73.74 ±0.61 / 74.55 ms │          72.72 / 73.66 ±0.73 / 74.60 ms │ no change │
│ QQuery 18 │ 66.40 / 69.82 ±2.24 / 72.71 ms │          68.69 / 70.42 ±1.59 / 72.94 ms │ no change │
│ QQuery 19 │ 28.85 / 29.13 ±0.24 / 29.47 ms │          28.87 / 29.18 ±0.30 / 29.74 ms │ no change │
│ QQuery 20 │ 33.02 / 33.33 ±0.26 / 33.67 ms │          33.05 / 33.45 ±0.39 / 34.12 ms │ no change │
│ QQuery 21 │ 50.71 / 51.29 ±0.44 / 51.98 ms │          50.81 / 51.05 ±0.23 / 51.42 ms │ no change │
│ QQuery 22 │ 14.91 / 15.09 ±0.23 / 15.53 ms │          14.95 / 15.14 ±0.12 / 15.26 ms │ no change │
└───────────┴────────────────────────────────┴─────────────────────────────────────────┴───────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━┓
┃ Benchmark Summary                                      ┃          ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━┩
│ Total Time (HEAD)                                      │ 763.74ms │
│ Total Time (rich-T-kid_regexp-replace-dict-encoding)   │ 762.51ms │
│ Average Time (HEAD)                                    │  34.72ms │
│ Average Time (rich-T-kid_regexp-replace-dict-encoding) │  34.66ms │
│ Queries Faster                                         │        0 │
│ Queries Slower                                         │        0 │
│ Queries with No Change                                 │       22 │
│ Queries with Failure                                   │        0 │
└────────────────────────────────────────────────────────┴──────────┘

Memory Pool Peaks

Peak MemoryPool reservation per query — what DataFusion's accounting believes it reserved. Recorded only for benchmarks that write a results JSON (the dfbench suites, and the suites bench.sh runs through the Criterion SQL harness since #25644), and only under a memory limit: DATAFUSION_RUNTIME_MEMORY_LIMIT, or one the suite sets itself.

Base: 334f293 (merge-base) | Changed: rich-T-kid/regexp-replace-dict-encoding

tpch — tpch_sf1

Query Base Changed Change
Query 1 40.1 MiB 30.1 MiB -24.9%
Query 2 23.1 MiB 23.1 MiB +0.0%
Query 3 11.5 MiB 11.5 MiB +0.0%
Query 4 22.3 MiB 22.3 MiB +0.0%
Query 5 32.9 MiB 42.9 MiB +30.4%
Query 6 832 B 832 B +0.0%
Query 7 107.6 MiB 107.6 MiB +0.0%
Query 8 33.3 MiB 33.2 MiB -0.2%
Query 9 155.6 MiB 155.6 MiB +0.0%
Query 10 63.3 MiB 62.9 MiB -0.6%
Query 11 51.5 MiB 31.3 MiB -39.2%
Query 12 10.2 MiB 20.1 MiB +96.5%
Query 13 62.5 MiB 52.3 MiB -16.2%
Query 14 7.7 MiB 7.7 MiB +0.0%
Query 15 12.9 MiB 12.8 MiB -0.8%
Query 16 33.7 MiB 42.3 MiB +25.7%
Query 17 141.3 MiB 141.3 MiB +0.0%
Query 18 123.0 MiB 122.9 MiB -0.1%
Query 19 228.6 KiB 228.6 KiB +0.0%
Query 20 57.1 MiB 63.3 MiB +11.0%
Query 21 37.7 MiB 37.7 MiB +0.0%
Query 22 22.2 MiB 22.2 MiB +0.0%

Pool accounting vs. process RSS

Max pool peak is the largest reservation any single query in the run reached; peak RSS covers the whole invocation, including data loading and allocator retention, and the two high-water marks need not coincide in time. The gap is therefore an upper bound on what the pool did not account for, not a measurement of it.

Benchmark Side Max pool peak Peak RSS Gap RSS / pool
tpch base (334f293 (merge-base)) 155.6 MiB 1.0 GiB 918.5 MiB 6.9×
tpch changed (rich-T-kid/regexp-replace-dict-encoding) 155.6 MiB 1.1 GiB 981.9 MiB 7.3×
Resource Usage

tpch — base (merge-base)

Metric Value
Wall time 5.0s
Peak memory 1.0 GiB
Avg memory 461.3 MiB
CPU user 20.4s
CPU sys 1.5s
Peak spill 0 B

tpch — branch

Metric Value
Wall time 5.0s
Peak memory 1.1 GiB
Avg memory 482.4 MiB
CPU user 20.5s
CPU sys 1.4s
Peak spill 0 B

File an issue against this benchmark runner

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark completed (GKE) | trigger

Instance: c4a-highcpu-48 (12 vCPU / 65 GiB)

Comparing rich-T-kid/regexp-replace-dict-encoding (7a2ee99) to 334f293 (merge-base) diff

Run configuration
run benchmark tpcds
env:
  DATAFUSION_RUNTIME_MEMORY_LIMIT: "32G"
baseline:
  env:
    DATAFUSION_EXECUTION_PARQUET_ENABLE_RLE_TO_DICTIONARY: "true"
changed:
  env:
    DATAFUSION_EXECUTION_PARQUET_ENABLE_RLE_TO_DICTIONARY: "true"
CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  48
On-line CPU(s) list:                     0-47
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     48
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:                               3 MiB (48 instances)
L1i cache:                               3 MiB (48 instances)
L2 cache:                                96 MiB (48 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-47
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 rich-T-kid_regexp-replace-dict-encoding
--------------------
Benchmark tpcds_sf1.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┓
┃ Query     ┃       HEAD ┃ rich-T-kid_regexp-replace-dict-encoding ┃       Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━┩
│ QQuery 1  │    5.56 ms │                                 5.40 ms │    no change │
│ QQuery 2  │   75.72 ms │                                75.34 ms │    no change │
│ QQuery 3  │   28.12 ms │                                28.12 ms │    no change │
│ QQuery 4  │  554.84 ms │                               546.28 ms │    no change │
│ QQuery 5  │   50.25 ms │                                50.03 ms │    no change │
│ QQuery 6  │   32.98 ms │                                32.36 ms │    no change │
│ QQuery 7  │   72.92 ms │                                71.75 ms │    no change │
│ QQuery 8  │   36.70 ms │                                36.63 ms │    no change │
│ QQuery 9  │   51.70 ms │                                50.82 ms │    no change │
│ QQuery 10 │   62.03 ms │                                61.16 ms │    no change │
│ QQuery 11 │  366.91 ms │                               359.43 ms │    no change │
│ QQuery 12 │   25.41 ms │                                25.04 ms │    no change │
│ QQuery 13 │  112.99 ms │                               112.18 ms │    no change │
│ QQuery 14 │  388.65 ms │                               381.43 ms │    no change │
│ QQuery 15 │   63.77 ms │                                62.55 ms │    no change │
│ QQuery 16 │    6.44 ms │                                 6.37 ms │    no change │
│ QQuery 17 │   81.35 ms │                                79.50 ms │    no change │
│ QQuery 18 │  104.76 ms │                               102.82 ms │    no change │
│ QQuery 19 │   41.38 ms │                                40.71 ms │    no change │
│ QQuery 20 │   30.76 ms │                                30.30 ms │    no change │
│ QQuery 21 │   16.38 ms │                                16.43 ms │    no change │
│ QQuery 22 │   70.56 ms │                                70.29 ms │    no change │
│ QQuery 23 │  297.14 ms │                               294.58 ms │    no change │
│ QQuery 24 │  187.06 ms │                               187.17 ms │    no change │
│ QQuery 25 │  106.28 ms │                               106.51 ms │    no change │
│ QQuery 26 │   46.00 ms │                                45.87 ms │    no change │
│ QQuery 27 │    5.94 ms │                                 6.08 ms │    no change │
│ QQuery 28 │   58.97 ms │                                59.93 ms │    no change │
│ QQuery 29 │   95.58 ms │                                94.78 ms │    no change │
│ QQuery 30 │   35.54 ms │                                35.76 ms │    no change │
│ QQuery 31 │  109.88 ms │                               109.50 ms │    no change │
│ QQuery 32 │   19.27 ms │                                19.35 ms │    no change │
│ QQuery 33 │   35.87 ms │                                36.27 ms │    no change │
│ QQuery 34 │    9.49 ms │                                 9.60 ms │    no change │
│ QQuery 35 │   69.52 ms │                                69.66 ms │    no change │
│ QQuery 36 │    5.74 ms │                                 6.05 ms │ 1.05x slower │
│ QQuery 37 │    7.03 ms │                                 7.15 ms │    no change │
│ QQuery 38 │   64.07 ms │                                64.09 ms │    no change │
│ QQuery 39 │   71.44 ms │                                70.71 ms │    no change │
│ QQuery 40 │   22.40 ms │                                22.34 ms │    no change │
│ QQuery 41 │   12.08 ms │                                12.41 ms │    no change │
│ QQuery 42 │   23.06 ms │                                23.03 ms │    no change │
│ QQuery 43 │    4.90 ms │                                 5.11 ms │    no change │
│ QQuery 44 │    8.50 ms │                                 8.72 ms │    no change │
│ QQuery 45 │   34.55 ms │                                34.24 ms │    no change │
│ QQuery 46 │   11.24 ms │                                11.72 ms │    no change │
│ QQuery 47 │  198.41 ms │                               199.60 ms │    no change │
│ QQuery 48 │   89.46 ms │                                89.75 ms │    no change │
│ QQuery 49 │   68.41 ms │                                68.51 ms │    no change │
│ QQuery 50 │   57.96 ms │                                57.53 ms │    no change │
│ QQuery 51 │   91.26 ms │                                91.56 ms │    no change │
│ QQuery 52 │   23.19 ms │                                23.01 ms │    no change │
│ QQuery 53 │   28.36 ms │                                28.45 ms │    no change │
│ QQuery 54 │   52.43 ms │                                51.97 ms │    no change │
│ QQuery 55 │   22.90 ms │                                22.71 ms │    no change │
│ QQuery 56 │   36.88 ms │                                37.39 ms │    no change │
│ QQuery 57 │  150.62 ms │                               151.01 ms │    no change │
│ QQuery 58 │  101.33 ms │                               101.01 ms │    no change │
│ QQuery 59 │  105.94 ms │                               105.36 ms │    no change │
│ QQuery 60 │   37.77 ms │                                37.55 ms │    no change │
│ QQuery 61 │   10.91 ms │                                11.15 ms │    no change │
│ QQuery 62 │   42.55 ms │                                42.83 ms │    no change │
│ QQuery 63 │   28.44 ms │                                28.72 ms │    no change │
│ QQuery 64 │  362.39 ms │                               362.96 ms │    no change │
│ QQuery 65 │  132.93 ms │                               129.52 ms │    no change │
│ QQuery 66 │   73.08 ms │                                73.40 ms │    no change │
│ QQuery 67 │  218.05 ms │                               220.72 ms │    no change │
│ QQuery 68 │   11.14 ms │                                11.53 ms │    no change │
│ QQuery 69 │   55.81 ms │                                56.30 ms │    no change │
│ QQuery 70 │   97.52 ms │                                96.97 ms │    no change │
│ QQuery 71 │   34.34 ms │                                34.23 ms │    no change │
│ QQuery 72 │ 1557.67 ms │                              1482.01 ms │    no change │
│ QQuery 73 │    9.16 ms │                                 9.33 ms │    no change │
│ QQuery 74 │  198.77 ms │                               198.69 ms │    no change │
│ QQuery 75 │  137.41 ms │                               138.17 ms │    no change │
│ QQuery 76 │   33.63 ms │                                33.48 ms │    no change │
│ QQuery 77 │   58.73 ms │                                58.62 ms │    no change │
│ QQuery 78 │  155.26 ms │                               157.96 ms │    no change │
│ QQuery 79 │   65.78 ms │                                65.98 ms │    no change │
│ QQuery 80 │   93.70 ms │                                95.38 ms │    no change │
│ QQuery 81 │   27.99 ms │                                27.95 ms │    no change │
│ QQuery 82 │   16.56 ms │                                16.30 ms │    no change │
│ QQuery 83 │   31.77 ms │                                31.77 ms │    no change │
│ QQuery 84 │   30.21 ms │                                30.75 ms │    no change │
│ QQuery 85 │   97.33 ms │                                98.25 ms │    no change │
│ QQuery 86 │   24.09 ms │                                24.01 ms │    no change │
│ QQuery 87 │   64.15 ms │                                63.93 ms │    no change │
│ QQuery 88 │   57.73 ms │                                58.44 ms │    no change │
│ QQuery 89 │   34.58 ms │                                34.71 ms │    no change │
│ QQuery 90 │   15.79 ms │                                15.85 ms │    no change │
│ QQuery 91 │   40.30 ms │                                40.31 ms │    no change │
│ QQuery 92 │   28.02 ms │                                28.11 ms │    no change │
│ QQuery 93 │   47.20 ms │                                47.90 ms │    no change │
│ QQuery 94 │   36.87 ms │                                36.80 ms │    no change │
│ QQuery 95 │   79.40 ms │                                77.64 ms │    no change │
│ QQuery 96 │   22.94 ms │                                23.16 ms │    no change │
│ QQuery 97 │   50.42 ms │                                50.54 ms │    no change │
│ QQuery 98 │   37.22 ms │                                36.94 ms │    no change │
│ QQuery 99 │   63.35 ms │                                63.30 ms │    no change │
└───────────┴────────────┴─────────────────────────────────────────┴──────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┓
┃ Benchmark Summary                                      ┃           ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━┩
│ Total Time (HEAD)                                      │ 8869.77ms │
│ Total Time (rich-T-kid_regexp-replace-dict-encoding)   │ 8765.58ms │
│ Average Time (HEAD)                                    │   89.59ms │
│ Average Time (rich-T-kid_regexp-replace-dict-encoding) │   88.54ms │
│ Queries Faster                                         │         0 │
│ Queries Slower                                         │         1 │
│ Queries with No Change                                 │        98 │
│ Queries with Failure                                   │         0 │
└────────────────────────────────────────────────────────┴───────────┘

Distribution per query (min / mean ±stddev / max):

Comparing HEAD and rich-T-kid_regexp-replace-dict-encoding
--------------------
Benchmark tpcds_sf1.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Query     ┃                                  HEAD ┃ rich-T-kid_regexp-replace-dict-encoding ┃        Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ QQuery 1  │           5.56 / 6.17 ±1.07 / 8.31 ms │             5.40 / 5.97 ±1.05 / 8.08 ms │     no change │
│ QQuery 2  │        75.72 / 76.35 ±0.47 / 77.10 ms │          75.34 / 75.59 ±0.26 / 76.05 ms │     no change │
│ QQuery 3  │        28.12 / 28.46 ±0.23 / 28.84 ms │          28.12 / 28.52 ±0.26 / 28.93 ms │     no change │
│ QQuery 4  │     554.84 / 562.55 ±5.80 / 571.28 ms │       546.28 / 553.67 ±4.83 / 560.16 ms │     no change │
│ QQuery 5  │        50.25 / 50.74 ±0.42 / 51.48 ms │          50.03 / 50.40 ±0.36 / 51.06 ms │     no change │
│ QQuery 6  │        32.98 / 33.39 ±0.33 / 33.83 ms │          32.36 / 32.81 ±0.38 / 33.49 ms │     no change │
│ QQuery 7  │        72.92 / 74.36 ±1.65 / 77.47 ms │          71.75 / 73.00 ±2.04 / 77.06 ms │     no change │
│ QQuery 8  │        36.70 / 37.10 ±0.36 / 37.73 ms │          36.63 / 36.97 ±0.30 / 37.49 ms │     no change │
│ QQuery 9  │        51.70 / 52.54 ±0.88 / 54.08 ms │          50.82 / 52.11 ±0.75 / 53.09 ms │     no change │
│ QQuery 10 │        62.03 / 62.17 ±0.13 / 62.39 ms │          61.16 / 61.50 ±0.29 / 61.90 ms │     no change │
│ QQuery 11 │     366.91 / 367.81 ±1.05 / 369.57 ms │       359.43 / 362.34 ±4.03 / 370.27 ms │     no change │
│ QQuery 12 │        25.41 / 25.67 ±0.17 / 25.93 ms │          25.04 / 25.24 ±0.30 / 25.83 ms │     no change │
│ QQuery 13 │     112.99 / 115.48 ±4.00 / 123.45 ms │       112.18 / 114.51 ±2.46 / 118.76 ms │     no change │
│ QQuery 14 │     388.65 / 391.17 ±1.83 / 393.85 ms │       381.43 / 383.43 ±2.10 / 387.39 ms │     no change │
│ QQuery 15 │        63.77 / 64.84 ±0.86 / 66.24 ms │          62.55 / 63.66 ±1.03 / 65.52 ms │     no change │
│ QQuery 16 │           6.44 / 6.58 ±0.22 / 7.01 ms │             6.37 / 6.49 ±0.11 / 6.65 ms │     no change │
│ QQuery 17 │        81.35 / 82.63 ±1.46 / 85.32 ms │          79.50 / 80.15 ±0.90 / 81.87 ms │     no change │
│ QQuery 18 │     104.76 / 105.55 ±0.68 / 106.45 ms │       102.82 / 103.47 ±0.92 / 105.24 ms │     no change │
│ QQuery 19 │        41.38 / 41.86 ±0.37 / 42.39 ms │          40.71 / 41.03 ±0.21 / 41.25 ms │     no change │
│ QQuery 20 │        30.76 / 32.65 ±1.93 / 36.26 ms │          30.30 / 30.65 ±0.39 / 31.42 ms │ +1.07x faster │
│ QQuery 21 │        16.38 / 16.58 ±0.19 / 16.87 ms │          16.43 / 16.69 ±0.32 / 17.32 ms │     no change │
│ QQuery 22 │        70.56 / 71.26 ±0.50 / 71.88 ms │          70.29 / 71.02 ±0.61 / 71.83 ms │     no change │
│ QQuery 23 │     297.14 / 302.59 ±4.70 / 310.79 ms │       294.58 / 297.31 ±1.86 / 299.65 ms │     no change │
│ QQuery 24 │     187.06 / 189.74 ±2.49 / 193.98 ms │       187.17 / 191.29 ±3.41 / 195.49 ms │     no change │
│ QQuery 25 │     106.28 / 108.00 ±2.45 / 112.86 ms │       106.51 / 107.84 ±1.27 / 109.76 ms │     no change │
│ QQuery 26 │        46.00 / 47.00 ±1.39 / 49.67 ms │          45.87 / 46.28 ±0.31 / 46.58 ms │     no change │
│ QQuery 27 │           5.94 / 6.08 ±0.19 / 6.44 ms │             6.08 / 6.24 ±0.15 / 6.52 ms │     no change │
│ QQuery 28 │        58.97 / 60.98 ±3.07 / 67.06 ms │          59.93 / 60.14 ±0.18 / 60.36 ms │     no change │
│ QQuery 29 │       95.58 / 96.99 ±2.13 / 101.13 ms │          94.78 / 96.82 ±1.74 / 99.41 ms │     no change │
│ QQuery 30 │        35.54 / 37.65 ±2.88 / 43.35 ms │          35.76 / 37.03 ±1.64 / 40.24 ms │     no change │
│ QQuery 31 │     109.88 / 110.75 ±0.91 / 112.49 ms │       109.50 / 110.32 ±0.42 / 110.65 ms │     no change │
│ QQuery 32 │        19.27 / 19.89 ±0.45 / 20.66 ms │          19.35 / 19.65 ±0.40 / 20.43 ms │     no change │
│ QQuery 33 │        35.87 / 36.22 ±0.29 / 36.70 ms │          36.27 / 36.57 ±0.35 / 37.24 ms │     no change │
│ QQuery 34 │          9.49 / 9.78 ±0.40 / 10.52 ms │            9.60 / 9.80 ±0.24 / 10.26 ms │     no change │
│ QQuery 35 │        69.52 / 70.26 ±0.58 / 70.88 ms │          69.66 / 70.93 ±1.60 / 74.08 ms │     no change │
│ QQuery 36 │           5.74 / 5.87 ±0.15 / 6.16 ms │             6.05 / 6.16 ±0.13 / 6.38 ms │     no change │
│ QQuery 37 │          7.03 / 8.44 ±2.20 / 12.81 ms │             7.15 / 7.33 ±0.14 / 7.50 ms │ +1.15x faster │
│ QQuery 38 │        64.07 / 64.24 ±0.11 / 64.41 ms │          64.09 / 64.38 ±0.32 / 64.97 ms │     no change │
│ QQuery 39 │        71.44 / 72.30 ±0.91 / 74.04 ms │          70.71 / 72.69 ±2.59 / 77.73 ms │     no change │
│ QQuery 40 │        22.40 / 22.93 ±0.31 / 23.27 ms │          22.34 / 23.10 ±0.58 / 23.95 ms │     no change │
│ QQuery 41 │        12.08 / 12.25 ±0.13 / 12.48 ms │          12.41 / 12.55 ±0.09 / 12.71 ms │     no change │
│ QQuery 42 │        23.06 / 24.22 ±2.23 / 28.68 ms │          23.03 / 23.65 ±0.51 / 24.54 ms │     no change │
│ QQuery 43 │           4.90 / 5.02 ±0.17 / 5.35 ms │             5.11 / 5.20 ±0.11 / 5.40 ms │     no change │
│ QQuery 44 │           8.50 / 8.63 ±0.11 / 8.81 ms │             8.72 / 8.81 ±0.06 / 8.87 ms │     no change │
│ QQuery 45 │        34.55 / 34.96 ±0.34 / 35.57 ms │          34.24 / 35.19 ±1.36 / 37.88 ms │     no change │
│ QQuery 46 │        11.24 / 11.55 ±0.27 / 11.97 ms │          11.72 / 11.98 ±0.29 / 12.50 ms │     no change │
│ QQuery 47 │     198.41 / 201.16 ±2.29 / 204.53 ms │       199.60 / 201.14 ±1.78 / 204.58 ms │     no change │
│ QQuery 48 │        89.46 / 90.15 ±0.54 / 90.99 ms │          89.75 / 90.56 ±0.76 / 91.94 ms │     no change │
│ QQuery 49 │        68.41 / 69.31 ±0.97 / 71.09 ms │          68.51 / 69.48 ±0.96 / 71.26 ms │     no change │
│ QQuery 50 │        57.96 / 58.17 ±0.20 / 58.43 ms │          57.53 / 57.95 ±0.37 / 58.54 ms │     no change │
│ QQuery 51 │        91.26 / 91.92 ±0.49 / 92.65 ms │          91.56 / 93.40 ±1.27 / 94.97 ms │     no change │
│ QQuery 52 │        23.19 / 23.50 ±0.31 / 23.97 ms │          23.01 / 23.40 ±0.36 / 24.05 ms │     no change │
│ QQuery 53 │        28.36 / 28.80 ±0.31 / 29.24 ms │          28.45 / 28.67 ±0.18 / 28.91 ms │     no change │
│ QQuery 54 │        52.43 / 52.80 ±0.37 / 53.41 ms │          51.97 / 52.81 ±0.80 / 54.28 ms │     no change │
│ QQuery 55 │        22.90 / 23.10 ±0.16 / 23.37 ms │          22.71 / 23.27 ±0.34 / 23.74 ms │     no change │
│ QQuery 56 │        36.88 / 37.18 ±0.28 / 37.63 ms │          37.39 / 37.63 ±0.36 / 38.34 ms │     no change │
│ QQuery 57 │     150.62 / 152.75 ±2.41 / 157.35 ms │       151.01 / 151.38 ±0.33 / 151.92 ms │     no change │
│ QQuery 58 │     101.33 / 102.17 ±0.77 / 103.13 ms │       101.01 / 103.11 ±1.77 / 106.36 ms │     no change │
│ QQuery 59 │     105.94 / 107.20 ±1.81 / 110.78 ms │       105.36 / 106.04 ±0.98 / 107.98 ms │     no change │
│ QQuery 60 │        37.77 / 38.22 ±0.48 / 39.12 ms │          37.55 / 37.91 ±0.32 / 38.36 ms │     no change │
│ QQuery 61 │        10.91 / 11.07 ±0.22 / 11.52 ms │          11.15 / 12.25 ±2.00 / 16.25 ms │  1.11x slower │
│ QQuery 62 │        42.55 / 42.95 ±0.29 / 43.30 ms │          42.83 / 43.07 ±0.30 / 43.64 ms │     no change │
│ QQuery 63 │        28.44 / 29.74 ±1.23 / 32.01 ms │          28.72 / 28.93 ±0.18 / 29.25 ms │     no change │
│ QQuery 64 │     362.39 / 366.90 ±2.69 / 370.66 ms │       362.96 / 368.17 ±5.01 / 377.48 ms │     no change │
│ QQuery 65 │     132.93 / 135.49 ±1.82 / 138.03 ms │       129.52 / 132.48 ±1.84 / 135.18 ms │     no change │
│ QQuery 66 │        73.08 / 75.30 ±3.60 / 82.49 ms │          73.40 / 75.88 ±4.43 / 84.74 ms │     no change │
│ QQuery 67 │     218.05 / 225.09 ±5.00 / 231.40 ms │       220.72 / 222.83 ±2.51 / 227.52 ms │     no change │
│ QQuery 68 │        11.14 / 11.41 ±0.23 / 11.80 ms │          11.53 / 11.72 ±0.28 / 12.27 ms │     no change │
│ QQuery 69 │        55.81 / 56.13 ±0.19 / 56.36 ms │          56.30 / 56.94 ±0.60 / 58.06 ms │     no change │
│ QQuery 70 │      97.52 / 100.82 ±4.14 / 108.72 ms │        96.97 / 100.50 ±4.63 / 109.44 ms │     no change │
│ QQuery 71 │        34.34 / 35.14 ±1.01 / 37.09 ms │          34.23 / 34.42 ±0.16 / 34.64 ms │     no change │
│ QQuery 72 │ 1557.67 / 1594.40 ±30.14 / 1637.99 ms │   1482.01 / 1584.98 ±58.75 / 1651.64 ms │     no change │
│ QQuery 73 │           9.16 / 9.36 ±0.29 / 9.92 ms │             9.33 / 9.50 ±0.21 / 9.91 ms │     no change │
│ QQuery 74 │     198.77 / 200.75 ±2.52 / 205.27 ms │       198.69 / 199.89 ±1.23 / 201.75 ms │     no change │
│ QQuery 75 │     137.41 / 138.45 ±0.68 / 139.39 ms │       138.17 / 141.27 ±3.82 / 148.62 ms │     no change │
│ QQuery 76 │        33.63 / 33.85 ±0.26 / 34.37 ms │          33.48 / 33.79 ±0.24 / 34.21 ms │     no change │
│ QQuery 77 │        58.73 / 60.60 ±3.05 / 66.67 ms │          58.62 / 59.03 ±0.39 / 59.68 ms │     no change │
│ QQuery 78 │     155.26 / 160.80 ±4.38 / 168.53 ms │       157.96 / 162.11 ±4.31 / 170.38 ms │     no change │
│ QQuery 79 │        65.78 / 67.31 ±2.79 / 72.88 ms │          65.98 / 67.83 ±2.91 / 73.60 ms │     no change │
│ QQuery 80 │        93.70 / 95.13 ±1.23 / 96.59 ms │          95.38 / 96.32 ±0.84 / 97.76 ms │     no change │
│ QQuery 81 │        27.99 / 29.06 ±1.64 / 32.32 ms │          27.95 / 28.23 ±0.21 / 28.56 ms │     no change │
│ QQuery 82 │        16.56 / 16.95 ±0.39 / 17.65 ms │          16.30 / 16.56 ±0.19 / 16.83 ms │     no change │
│ QQuery 83 │        31.77 / 31.95 ±0.18 / 32.27 ms │          31.77 / 34.21 ±4.24 / 42.69 ms │  1.07x slower │
│ QQuery 84 │        30.21 / 32.63 ±4.29 / 41.20 ms │          30.75 / 31.12 ±0.40 / 31.82 ms │     no change │
│ QQuery 85 │        97.33 / 98.07 ±0.71 / 99.13 ms │          98.25 / 98.43 ±0.18 / 98.74 ms │     no change │
│ QQuery 86 │        24.09 / 25.09 ±1.22 / 27.41 ms │          24.01 / 24.31 ±0.30 / 24.72 ms │     no change │
│ QQuery 87 │        64.15 / 64.63 ±0.26 / 64.88 ms │          63.93 / 64.45 ±0.37 / 64.83 ms │     no change │
│ QQuery 88 │        57.73 / 59.63 ±1.92 / 63.31 ms │          58.44 / 59.19 ±0.75 / 60.55 ms │     no change │
│ QQuery 89 │        34.58 / 35.14 ±0.44 / 35.72 ms │          34.71 / 34.81 ±0.08 / 34.90 ms │     no change │
│ QQuery 90 │        15.79 / 15.97 ±0.11 / 16.08 ms │          15.85 / 16.04 ±0.18 / 16.33 ms │     no change │
│ QQuery 91 │        40.30 / 41.33 ±1.18 / 43.34 ms │          40.31 / 40.52 ±0.24 / 40.96 ms │     no change │
│ QQuery 92 │        28.02 / 28.68 ±0.75 / 30.14 ms │          28.11 / 29.21 ±1.59 / 32.32 ms │     no change │
│ QQuery 93 │        47.20 / 48.74 ±1.01 / 50.09 ms │          47.90 / 48.98 ±1.02 / 50.69 ms │     no change │
│ QQuery 94 │        36.87 / 37.29 ±0.34 / 37.88 ms │          36.80 / 37.24 ±0.35 / 37.81 ms │     no change │
│ QQuery 95 │        79.40 / 80.37 ±1.32 / 82.89 ms │          77.64 / 78.56 ±0.55 / 79.32 ms │     no change │
│ QQuery 96 │        22.94 / 23.24 ±0.28 / 23.74 ms │          23.16 / 23.43 ±0.32 / 24.04 ms │     no change │
│ QQuery 97 │        50.42 / 51.23 ±0.48 / 51.65 ms │          50.54 / 53.30 ±3.70 / 60.50 ms │     no change │
│ QQuery 98 │        37.22 / 37.63 ±0.36 / 38.23 ms │          36.94 / 37.48 ±0.43 / 38.26 ms │     no change │
│ QQuery 99 │        63.35 / 63.70 ±0.34 / 64.30 ms │          63.30 / 63.55 ±0.18 / 63.76 ms │     no change │
└───────────┴───────────────────────────────────────┴─────────────────────────────────────────┴───────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┓
┃ Benchmark Summary                                      ┃           ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━┩
│ Total Time (HEAD)                                      │ 9020.74ms │
│ Total Time (rich-T-kid_regexp-replace-dict-encoding)   │ 8968.72ms │
│ Average Time (HEAD)                                    │   91.12ms │
│ Average Time (rich-T-kid_regexp-replace-dict-encoding) │   90.59ms │
│ Queries Faster                                         │         2 │
│ Queries Slower                                         │         2 │
│ Queries with No Change                                 │        95 │
│ Queries with Failure                                   │         0 │
└────────────────────────────────────────────────────────┴───────────┘

Memory Pool Peaks

Peak MemoryPool reservation per query — what DataFusion's accounting believes it reserved. Recorded only for benchmarks that write a results JSON (the dfbench suites, and the suites bench.sh runs through the Criterion SQL harness since #25644), and only under a memory limit: DATAFUSION_RUNTIME_MEMORY_LIMIT, or one the suite sets itself.

Base: 334f293 (merge-base) | Changed: rich-T-kid/regexp-replace-dict-encoding

tpcds — tpcds_sf1

Query Base Changed Change
Query 1 138.7 KiB 133.1 KiB -4.1%
Query 2 80.9 MiB 59.9 MiB -26.0%
Query 3 1.9 MiB 1.6 MiB -12.6%
Query 4 87.8 MiB 87.8 MiB +0.0%
Query 5 12.5 MiB 13.0 MiB +4.2%
Query 6 4.4 MiB 4.1 MiB -6.4%
Query 7 3.7 MiB 3.6 MiB -1.0%
Query 8 1.8 MiB 1.7 MiB -5.6%
Query 9 32.1 KiB 32.1 KiB +0.0%
Query 10 2.0 MiB 2.0 MiB +0.0%
Query 11 58.8 MiB 58.8 MiB -0.0%
Query 12 114.4 MiB 114.4 MiB -0.0%
Query 13 13.0 MiB 13.7 MiB +5.1%
Query 14 170.9 MiB 170.9 MiB +0.0%
Query 15 4.1 MiB 4.2 MiB +3.1%
Query 16 100.4 KiB 100.4 KiB +0.0%
Query 17 41.0 MiB 41.0 MiB +0.0%
Query 18 21.2 MiB 21.2 MiB +0.0%
Query 19 1.9 MiB 1.7 MiB -12.2%
Query 20 114.6 MiB 114.6 MiB -0.0%
Query 21 2.6 MiB 3.0 MiB +14.6%
Query 22 61.8 MiB 61.8 MiB +0.0%
Query 23 213.4 MiB 212.7 MiB -0.3%
Query 24 38.7 MiB 38.7 MiB +0.0%
Query 25 99.9 MiB 99.9 MiB +0.0%
Query 26 3.5 MiB 3.5 MiB -0.0%
Query 27 1.6 MiB 1.6 MiB +0.0%
Query 28 1.5 MiB 1.3 MiB -9.1%
Query 29 104.7 MiB 104.7 MiB +0.0%
Query 30 3.8 MiB 4.0 MiB +5.5%
Query 31 13.4 MiB 13.4 MiB -0.1%
Query 32 2.7 MiB 2.5 MiB -8.2%
Query 33 5.3 MiB 4.0 MiB -23.8%
Query 34 6.0 MiB 6.0 MiB +0.0%
Query 35 16.6 MiB 15.7 MiB -5.3%
Query 36 10.3 MiB 10.3 MiB +0.0%
Query 37 3.3 MiB 3.3 MiB +0.0%
Query 38 10.8 MiB 10.8 MiB +0.2%
Query 39 42.6 MiB 43.3 MiB +1.7%
Query 40 12.2 MiB 12.2 MiB +0.0%
Query 41 2.1 MiB 2.1 MiB +0.0%
Query 42 1.0 MiB 1.2 MiB +18.9%
Query 43 257.8 KiB 257.8 KiB +0.0%
Query 44 196.9 KiB 196.9 KiB +0.0%
Query 45 4.5 MiB 4.5 MiB +0.0%
Query 46 6.2 MiB 6.2 MiB +0.0%
Query 47 128.5 MiB 128.5 MiB -0.0%
Query 48 11.8 MiB 11.8 MiB +0.0%
Query 49 51.5 MiB 61.1 MiB +18.6%
Query 50 17.3 MiB 17.3 MiB -0.0%
Query 51 178.3 MiB 178.6 MiB +0.2%
Query 52 1.3 MiB 1.5 MiB +15.7%
Query 53 30.6 MiB 20.6 MiB -32.7%
Query 54 2.2 MiB 2.1 MiB -6.9%
Query 55 1.5 MiB 1.3 MiB -14.2%
Query 56 2.9 MiB 2.7 MiB -6.8%
Query 57 120.8 MiB 120.8 MiB -0.0%
Query 58 4.2 MiB 4.4 MiB +5.1%
Query 59 11.7 MiB 11.7 MiB +0.0%
Query 60 5.1 MiB 5.0 MiB -0.9%
Query 61 1.2 MiB 888.8 KiB -29.0%
Query 62 3.7 MiB 3.3 MiB -9.1%
Query 63 30.6 MiB 30.6 MiB +0.0%
Query 64 84.8 MiB 75.6 MiB -10.8%
Query 65 29.7 MiB 29.7 MiB -0.0%
Query 66 11.9 MiB 14.9 MiB +26.1%
Query 67 143.0 MiB 137.4 MiB -3.9%
Query 68 6.2 MiB 6.2 MiB +0.0%
Query 69 3.6 MiB 3.6 MiB -1.1%
Query 70 44.0 MiB 44.0 MiB -0.0%
Query 71 40.4 MiB 40.4 MiB -0.0%
Query 72 97.2 MiB 97.2 MiB +0.0%
Query 73 6.0 MiB 6.0 MiB +0.0%
Query 74 33.6 MiB 33.6 MiB +0.0%
Query 75 20.8 MiB 19.6 MiB -5.7%
Query 76 7.9 MiB 7.9 MiB +0.0%
Query 77 3.7 MiB 4.0 MiB +7.5%
Query 78 109.4 MiB 109.8 MiB +0.4%
Query 79 9.4 MiB 8.7 MiB -6.9%
Query 80 42.0 MiB 41.6 MiB -1.0%
Query 81 4.1 MiB 4.1 MiB +0.2%
Query 82 4.9 MiB 4.9 MiB +0.0%
Query 83 8.8 MiB 9.0 MiB +2.3%
Query 84 11.9 MiB 11.9 MiB +0.0%
Query 85 17.0 MiB 17.0 MiB +0.0%
Query 86 82.1 MiB 91.9 MiB +12.0%
Query 87 12.9 MiB 12.9 MiB +0.0%
Query 88 1.8 MiB 1.8 MiB -4.0%
Query 89 112.2 MiB 112.2 MiB +0.0%
Query 90 564.1 KiB 564.1 KiB +0.0%
Query 91 31.3 MiB 31.3 MiB -0.1%
Query 92 2.7 MiB 2.5 MiB -8.2%
Query 93 15.1 MiB 14.8 MiB -1.8%
Query 94 3.7 MiB 3.7 MiB +0.0%
Query 95 17.4 MiB 17.7 MiB +1.7%
Query 96 224.7 KiB 224.7 KiB +0.0%
Query 97 33.1 MiB 33.1 MiB -0.2%
Query 98 114.7 MiB 114.7 MiB +0.0%
Query 99 1.4 MiB 1.6 MiB +15.4%

Pool accounting vs. process RSS

Max pool peak is the largest reservation any single query in the run reached; peak RSS covers the whole invocation, including data loading and allocator retention, and the two high-water marks need not coincide in time. The gap is therefore an upper bound on what the pool did not account for, not a measurement of it.

Benchmark Side Max pool peak Peak RSS Gap RSS / pool
tpcds base (334f293 (merge-base)) 213.4 MiB 1.4 GiB 1.2 GiB 6.9×
tpcds changed (rich-T-kid/regexp-replace-dict-encoding) 212.7 MiB 1.6 GiB 1.4 GiB 7.9×
Resource Usage

tpcds — base (merge-base)

Metric Value
Wall time 50.0s
Peak memory 1.4 GiB
Avg memory 1006.3 MiB
CPU user 188.6s
CPU sys 5.2s
Peak spill 0 B

tpcds — branch

Metric Value
Wall time 50.0s
Peak memory 1.6 GiB
Avg memory 1.1 GiB
CPU user 186.5s
CPU sys 5.2s
Peak spill 0 B

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-c6117466431-3322-brth4 6.12.94+ #1 SMP Fri Aug 21 08:00:16 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 rich-T-kid/regexp-replace-dict-encoding (7a2ee99) to 334f293 (merge-base) diff

Run configuration
run benchmark clickbench_partitioned
env:
  DATAFUSION_RUNTIME_MEMORY_LIMIT: "32G"
baseline:
  env:
    DATAFUSION_EXECUTION_PARQUET_ENABLE_RLE_TO_DICTIONARY: "true"
changed:
  env:
    DATAFUSION_EXECUTION_PARQUET_ENABLE_RLE_TO_DICTIONARY: "true"

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-highcpu-48 (12 vCPU / 65 GiB)

Comparing rich-T-kid/regexp-replace-dict-encoding (7a2ee99) to 334f293 (merge-base) diff

Run configuration
run benchmark clickbench_partitioned
env:
  DATAFUSION_RUNTIME_MEMORY_LIMIT: "32G"
baseline:
  env:
    DATAFUSION_EXECUTION_PARQUET_ENABLE_RLE_TO_DICTIONARY: "false"
changed:
  env:
    DATAFUSION_EXECUTION_PARQUET_ENABLE_RLE_TO_DICTIONARY: "true"
CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  48
On-line CPU(s) list:                     0-47
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     48
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:                               3 MiB (48 instances)
L1i cache:                               3 MiB (48 instances)
L2 cache:                                96 MiB (48 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-47
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 rich-T-kid_regexp-replace-dict-encoding
--------------------
Benchmark clickbench_partitioned.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Query     ┃       HEAD ┃ rich-T-kid_regexp-replace-dict-encoding ┃        Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ QQuery 0  │    1.19 ms │                                 1.16 ms │     no change │
│ QQuery 1  │   11.59 ms │                                11.13 ms │     no change │
│ QQuery 2  │   35.69 ms │                                35.50 ms │     no change │
│ QQuery 3  │   30.83 ms │                                30.44 ms │     no change │
│ QQuery 4  │  236.09 ms │                               232.21 ms │     no change │
│ QQuery 5  │  270.55 ms │                              1459.04 ms │  5.39x slower │
│ QQuery 6  │    1.24 ms │                                 1.17 ms │ +1.06x faster │
│ QQuery 7  │   12.70 ms │                                12.29 ms │     no change │
│ QQuery 8  │  326.28 ms │                               333.26 ms │     no change │
│ QQuery 9  │  467.95 ms │                               472.29 ms │     no change │
│ QQuery 10 │   64.53 ms │                               197.04 ms │  3.05x slower │
│ QQuery 11 │   74.66 ms │                               208.08 ms │  2.79x slower │
│ QQuery 12 │  260.98 ms │                              1496.32 ms │  5.73x slower │
│ QQuery 13 │  358.65 ms │                              2095.21 ms │  5.84x slower │
│ QQuery 14 │  273.95 ms │                              1615.11 ms │  5.90x slower │
│ QQuery 15 │  280.76 ms │                               294.21 ms │     no change │
│ QQuery 16 │  607.54 ms │                              3623.56 ms │  5.96x slower │
│ QQuery 17 │  614.71 ms │                              3697.24 ms │  6.01x slower │
│ QQuery 18 │ 1256.94 ms │                              6726.01 ms │  5.35x slower │
│ QQuery 19 │   27.07 ms │                                26.44 ms │     no change │
│ QQuery 20 │  515.05 ms │                              1036.37 ms │  2.01x slower │
│ QQuery 21 │  509.50 ms │                              1345.77 ms │  2.64x slower │
│ QQuery 22 │  996.51 ms │                              3206.24 ms │  3.22x slower │
│ QQuery 23 │ 3126.83 ms │                              9024.23 ms │  2.89x slower │
│ QQuery 24 │   42.00 ms │                                94.58 ms │  2.25x slower │
│ QQuery 25 │  105.75 ms │                               349.90 ms │  3.31x slower │
│ QQuery 26 │   40.84 ms │                                96.12 ms │  2.35x slower │
│ QQuery 27 │  509.32 ms │                              1132.39 ms │  2.22x slower │
│ QQuery 28 │ 2889.12 ms │                              2752.82 ms │     no change │
│ QQuery 29 │   39.05 ms │                                38.52 ms │     no change │
│ QQuery 30 │  303.98 ms │                               534.23 ms │  1.76x slower │
│ QQuery 31 │  282.30 ms │                               527.29 ms │  1.87x slower │
│ QQuery 32 │ 1075.77 ms │                              1015.70 ms │ +1.06x faster │
│ QQuery 33 │ 1522.75 ms │                             14061.85 ms │  9.23x slower │
│ QQuery 34 │ 1554.52 ms │                             13388.18 ms │  8.61x slower │
│ QQuery 35 │  296.46 ms │                               289.17 ms │     no change │
│ QQuery 36 │   66.31 ms │                               164.60 ms │  2.48x slower │
│ QQuery 37 │   35.04 ms │                                95.81 ms │  2.73x slower │
│ QQuery 38 │   44.79 ms │                                80.41 ms │  1.80x slower │
│ QQuery 39 │  148.24 ms │                               392.50 ms │  2.65x slower │
│ QQuery 40 │   14.07 ms │                                13.86 ms │     no change │
│ QQuery 41 │   13.18 ms │                                13.06 ms │     no change │
│ QQuery 42 │   12.76 ms │                                12.90 ms │     no change │
└───────────┴────────────┴─────────────────────────────────────────┴───────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Benchmark Summary                                      ┃            ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ Total Time (HEAD)                                      │ 19358.05ms │
│ Total Time (rich-T-kid_regexp-replace-dict-encoding)   │ 72234.19ms │
│ Average Time (HEAD)                                    │   450.19ms │
│ Average Time (rich-T-kid_regexp-replace-dict-encoding) │  1679.86ms │
│ Queries Faster                                         │          2 │
│ Queries Slower                                         │         25 │
│ Queries with No Change                                 │         16 │
│ Queries with Failure                                   │          0 │
└────────────────────────────────────────────────────────┴────────────┘

Distribution per query (min / mean ±stddev / max):

Comparing HEAD and rich-T-kid_regexp-replace-dict-encoding
--------------------
Benchmark clickbench_partitioned.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Query     ┃                                   HEAD ┃   rich-T-kid_regexp-replace-dict-encoding ┃        Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ QQuery 0  │           1.19 / 4.20 ±5.96 / 16.13 ms │              1.16 / 4.21 ±6.05 / 16.32 ms │     no change │
│ QQuery 1  │         11.59 / 11.80 ±0.14 / 12.00 ms │            11.13 / 11.35 ±0.18 / 11.65 ms │     no change │
│ QQuery 2  │         35.69 / 35.92 ±0.21 / 36.24 ms │            35.50 / 35.63 ±0.12 / 35.80 ms │     no change │
│ QQuery 3  │         30.83 / 31.22 ±0.61 / 32.43 ms │            30.44 / 30.60 ±0.21 / 31.00 ms │     no change │
│ QQuery 4  │      236.09 / 238.97 ±2.47 / 243.17 ms │         232.21 / 234.94 ±2.23 / 238.29 ms │     no change │
│ QQuery 5  │      270.55 / 275.05 ±3.93 / 281.10 ms │     1459.04 / 1495.15 ±36.23 / 1559.84 ms │  5.44x slower │
│ QQuery 6  │            1.24 / 1.39 ±0.22 / 1.81 ms │               1.17 / 1.32 ±0.24 / 1.78 ms │     no change │
│ QQuery 7  │         12.70 / 12.87 ±0.11 / 13.04 ms │            12.29 / 12.41 ±0.09 / 12.53 ms │     no change │
│ QQuery 8  │      326.28 / 331.17 ±2.55 / 333.27 ms │         333.26 / 348.88 ±9.11 / 360.99 ms │  1.05x slower │
│ QQuery 9  │      467.95 / 478.74 ±7.52 / 491.56 ms │         472.29 / 480.09 ±6.77 / 489.45 ms │     no change │
│ QQuery 10 │         64.53 / 65.36 ±0.78 / 66.79 ms │         197.04 / 198.18 ±1.48 / 201.06 ms │  3.03x slower │
│ QQuery 11 │         74.66 / 75.39 ±0.52 / 76.26 ms │         208.08 / 208.95 ±0.62 / 209.95 ms │  2.77x slower │
│ QQuery 12 │      260.98 / 265.61 ±5.06 / 275.07 ms │     1496.32 / 1544.63 ±36.33 / 1591.08 ms │  5.82x slower │
│ QQuery 13 │      358.65 / 365.11 ±5.53 / 372.31 ms │    2095.21 / 2472.91 ±302.45 / 2862.85 ms │  6.77x slower │
│ QQuery 14 │      273.95 / 281.61 ±5.63 / 287.83 ms │     1615.11 / 1658.85 ±22.28 / 1674.79 ms │  5.89x slower │
│ QQuery 15 │      280.76 / 282.94 ±2.09 / 286.35 ms │         294.21 / 303.08 ±9.81 / 319.63 ms │  1.07x slower │
│ QQuery 16 │     607.54 / 622.81 ±16.68 / 654.93 ms │     3623.56 / 3730.35 ±90.16 / 3841.66 ms │  5.99x slower │
│ QQuery 17 │      614.71 / 618.70 ±5.62 / 629.66 ms │     3697.24 / 3781.20 ±68.87 / 3896.65 ms │  6.11x slower │
│ QQuery 18 │  1256.94 / 1287.05 ±36.78 / 1359.12 ms │    6726.01 / 7016.17 ±197.08 / 7223.16 ms │  5.45x slower │
│ QQuery 19 │         27.07 / 27.35 ±0.31 / 27.94 ms │            26.44 / 26.90 ±0.53 / 27.91 ms │     no change │
│ QQuery 20 │      515.05 / 522.34 ±8.01 / 534.86 ms │     1036.37 / 1064.14 ±22.13 / 1095.50 ms │  2.04x slower │
│ QQuery 21 │      509.50 / 526.99 ±9.76 / 539.70 ms │     1345.77 / 1363.41 ±12.77 / 1381.99 ms │  2.59x slower │
│ QQuery 22 │   996.51 / 1011.24 ±21.18 / 1052.81 ms │     3206.24 / 3242.16 ±50.24 / 3340.46 ms │  3.21x slower │
│ QQuery 23 │ 3126.83 / 3275.99 ±137.31 / 3459.14 ms │    9024.23 / 9368.42 ±198.94 / 9592.55 ms │  2.86x slower │
│ QQuery 24 │     42.00 / 147.81 ±168.10 / 476.37 ms │            94.58 / 95.95 ±1.84 / 99.34 ms │ +1.54x faster │
│ QQuery 25 │      105.75 / 107.04 ±1.37 / 109.29 ms │         349.90 / 355.46 ±7.18 / 369.65 ms │  3.32x slower │
│ QQuery 26 │        40.84 / 46.51 ±10.98 / 68.46 ms │            96.12 / 97.23 ±0.79 / 98.22 ms │  2.09x slower │
│ QQuery 27 │      509.32 / 525.72 ±9.74 / 536.18 ms │      1132.39 / 1139.12 ±4.80 / 1146.10 ms │  2.17x slower │
│ QQuery 28 │  2889.12 / 2905.58 ±15.47 / 2932.51 ms │     2752.82 / 2797.41 ±46.32 / 2878.12 ms │     no change │
│ QQuery 29 │        39.05 / 53.16 ±22.65 / 98.01 ms │            38.52 / 38.87 ±0.25 / 39.15 ms │ +1.37x faster │
│ QQuery 30 │     303.98 / 315.81 ±15.72 / 346.27 ms │        534.23 / 548.57 ±12.26 / 570.65 ms │  1.74x slower │
│ QQuery 31 │      282.30 / 293.96 ±6.68 / 302.74 ms │         527.29 / 539.48 ±9.97 / 555.55 ms │  1.84x slower │
│ QQuery 32 │  1075.77 / 1152.55 ±56.34 / 1251.48 ms │     1015.70 / 1033.75 ±18.78 / 1069.95 ms │ +1.11x faster │
│ QQuery 33 │  1522.75 / 1643.27 ±87.92 / 1795.96 ms │ 14061.85 / 14650.60 ±622.72 / 15613.98 ms │  8.92x slower │
│ QQuery 34 │  1554.52 / 1601.70 ±32.87 / 1637.69 ms │ 13388.18 / 14125.83 ±762.00 / 15458.94 ms │  8.82x slower │
│ QQuery 35 │    296.46 / 371.41 ±136.08 / 643.34 ms │        289.17 / 341.78 ±78.76 / 497.29 ms │ +1.09x faster │
│ QQuery 36 │         66.31 / 71.29 ±3.67 / 77.70 ms │        164.60 / 189.33 ±19.10 / 222.79 ms │  2.66x slower │
│ QQuery 37 │         35.04 / 35.54 ±0.61 / 36.73 ms │           95.81 / 97.76 ±1.93 / 101.24 ms │  2.75x slower │
│ QQuery 38 │        44.79 / 54.36 ±12.12 / 77.68 ms │            80.41 / 86.78 ±3.56 / 91.36 ms │  1.60x slower │
│ QQuery 39 │     148.24 / 158.45 ±12.23 / 181.65 ms │        392.50 / 414.42 ±20.14 / 449.83 ms │  2.62x slower │
│ QQuery 40 │         14.07 / 15.32 ±2.31 / 19.93 ms │            13.86 / 14.44 ±0.48 / 15.20 ms │ +1.06x faster │
│ QQuery 41 │         13.18 / 17.17 ±7.48 / 32.13 ms │            13.06 / 14.26 ±1.97 / 18.19 ms │ +1.20x faster │
│ QQuery 42 │         12.76 / 14.83 ±3.71 / 22.24 ms │            12.90 / 13.10 ±0.21 / 13.50 ms │ +1.13x faster │
└───────────┴────────────────────────────────────────┴───────────────────────────────────────────┴───────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Benchmark Summary                                      ┃            ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ Total Time (HEAD)                                      │ 20181.32ms │
│ Total Time (rich-T-kid_regexp-replace-dict-encoding)   │ 75228.10ms │
│ Average Time (HEAD)                                    │   469.33ms │
│ Average Time (rich-T-kid_regexp-replace-dict-encoding) │  1749.49ms │
│ Queries Faster                                         │          7 │
│ Queries Slower                                         │         26 │
│ Queries with No Change                                 │         10 │
│ Queries with Failure                                   │          0 │
└────────────────────────────────────────────────────────┴────────────┘

Memory Pool Peaks

Peak MemoryPool reservation per query — what DataFusion's accounting believes it reserved. Recorded only for benchmarks that write a results JSON (the dfbench suites, and the suites bench.sh runs through the Criterion SQL harness since #25644), and only under a memory limit: DATAFUSION_RUNTIME_MEMORY_LIMIT, or one the suite sets itself.

Base: 334f293 (merge-base) | Changed: rich-T-kid/regexp-replace-dict-encoding

clickbench_partitioned

Query Base Changed Change
Query 0 0 B 0 B 0.0%
Query 1 104 B 104 B +0.0%
Query 2 936 B 936 B +0.0%
Query 3 312 B 312 B +0.0%
Query 4 761.2 MiB 771.0 MiB +1.3%
Query 5 1.2 GiB 1.4 GiB +20.0%
Query 6 0 B 0 B 0.0%
Query 7 50.3 MiB 40.3 MiB -19.9%
Query 8 950.6 MiB 945.9 MiB -0.5%
Query 9 593.7 MiB 635.5 MiB +7.0%
Query 10 110.1 MiB 72.6 MiB -34.1%
Query 11 111.9 MiB 75.9 MiB -32.2%
Query 12 1.3 GiB 1.6 GiB +19.9%
Query 13 1.6 GiB 1.8 GiB +10.4%
Query 14 1.3 GiB 1.8 GiB +45.9%
Query 15 1.2 GiB 1.1 GiB -7.1%
Query 16 3.4 GiB 3.4 GiB -0.9%
Query 17 3.5 GiB 3.3 GiB -4.7%
Query 18 8.3 GiB 7.3 GiB -11.9%
Query 19 0 B 0 B 0.0%
Query 20 104 B 104 B +0.0%
Query 21 3.7 MiB 1.4 MiB -63.0%
Query 22 2.9 MiB 2.2 MiB -23.0%
Query 23 4.2 GiB 13.1 MiB -99.7%
Query 24 58.9 MiB 6.3 MiB -89.3%
Query 25 158.3 MiB 8.1 MiB -94.9%
Query 26 58.9 MiB 7.5 MiB -87.4%
Query 27 2.2 MiB 2.4 MiB +9.3%
Query 28 1.8 GiB 2.0 GiB +8.3%
Query 29 624 B 624 B +0.0%
Query 30 716.1 MiB 634.6 MiB -11.4%
Query 31 1.5 GiB 1.5 GiB -4.6%
Query 32 7.2 GiB 7.1 GiB -0.8%
Query 33 7.7 GiB 12.7 GiB +65.8%
Query 34 7.8 GiB 12.4 GiB +57.8%
Query 35 611.6 MiB 604.3 MiB -1.2%
Query 36 115.4 MiB 474.1 MiB +311.0%
Query 37 6.6 MiB 8.1 MiB +22.0%
Query 38 5.6 MiB 5.3 MiB -5.7%
Query 39 297.8 MiB 450.8 MiB +51.3%
Query 40 2.3 MiB 2.6 MiB +13.4%
Query 41 3.1 MiB 3.1 MiB +0.0%
Query 42 1.7 MiB 1.7 MiB +0.4%

Pool accounting vs. process RSS

Max pool peak is the largest reservation any single query in the run reached; peak RSS covers the whole invocation, including data loading and allocator retention, and the two high-water marks need not coincide in time. The gap is therefore an upper bound on what the pool did not account for, not a measurement of it.

Benchmark Side Max pool peak Peak RSS Gap RSS / pool
clickbench_partitioned base (334f293 (merge-base)) 8.3 GiB 18.2 GiB 9.9 GiB 2.2×
clickbench_partitioned changed (rich-T-kid/regexp-replace-dict-encoding) 12.7 GiB 13.2 GiB 532.4 MiB 1.0×
Resource Usage

clickbench_partitioned — base (merge-base)

Metric Value
Wall time 105.0s
Peak memory 18.2 GiB
Avg memory 5.8 GiB
CPU user 995.2s
CPU sys 95.1s
Peak spill 0 B

clickbench_partitioned — branch

Metric Value
Wall time 380.1s
Peak memory 13.2 GiB
Avg memory 6.0 GiB
CPU user 3284.3s
CPU sys 200.1s
Peak spill 0 B

File an issue against this benchmark runner

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark completed (GKE) | trigger

Instance: c4a-highcpu-48 (12 vCPU / 65 GiB)

Comparing rich-T-kid/regexp-replace-dict-encoding (7a2ee99) to 334f293 (merge-base) diff

Run configuration
run benchmark clickbench_partitioned
env:
  DATAFUSION_RUNTIME_MEMORY_LIMIT: "32G"
baseline:
  env:
    DATAFUSION_EXECUTION_PARQUET_ENABLE_RLE_TO_DICTIONARY: "true"
changed:
  env:
    DATAFUSION_EXECUTION_PARQUET_ENABLE_RLE_TO_DICTIONARY: "true"
CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  48
On-line CPU(s) list:                     0-47
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     48
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:                               3 MiB (48 instances)
L1i cache:                               3 MiB (48 instances)
L2 cache:                                96 MiB (48 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-47
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 rich-T-kid_regexp-replace-dict-encoding
--------------------
Benchmark clickbench_partitioned.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Query     ┃        HEAD ┃ rich-T-kid_regexp-replace-dict-encoding ┃        Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ QQuery 0  │     1.16 ms │                                 1.16 ms │     no change │
│ QQuery 1  │    11.25 ms │                                11.26 ms │     no change │
│ QQuery 2  │    35.61 ms │                                35.31 ms │     no change │
│ QQuery 3  │    30.85 ms │                                30.49 ms │     no change │
│ QQuery 4  │   234.18 ms │                               233.47 ms │     no change │
│ QQuery 5  │  1436.58 ms │                              1439.34 ms │     no change │
│ QQuery 6  │     1.19 ms │                                 1.18 ms │     no change │
│ QQuery 7  │    12.25 ms │                                12.47 ms │     no change │
│ QQuery 8  │   336.03 ms │                               340.72 ms │     no change │
│ QQuery 9  │   465.64 ms │                               475.19 ms │     no change │
│ QQuery 10 │   198.86 ms │                               198.30 ms │     no change │
│ QQuery 11 │   209.30 ms │                               209.41 ms │     no change │
│ QQuery 12 │  1502.15 ms │                              1507.38 ms │     no change │
│ QQuery 13 │  2056.67 ms │                              2140.43 ms │     no change │
│ QQuery 14 │  1592.92 ms │                              1637.38 ms │     no change │
│ QQuery 15 │   290.58 ms │                               290.13 ms │     no change │
│ QQuery 16 │  3697.70 ms │                              3733.72 ms │     no change │
│ QQuery 17 │  3713.99 ms │                              3666.30 ms │     no change │
│ QQuery 18 │  6864.82 ms │                              6299.68 ms │ +1.09x faster │
│ QQuery 19 │    26.56 ms │                                26.66 ms │     no change │
│ QQuery 20 │  1037.55 ms │                              1041.06 ms │     no change │
│ QQuery 21 │  1351.25 ms │                              1359.46 ms │     no change │
│ QQuery 22 │  3230.45 ms │                              3151.37 ms │     no change │
│ QQuery 23 │  9267.09 ms │                              9038.36 ms │     no change │
│ QQuery 24 │    94.65 ms │                                96.15 ms │     no change │
│ QQuery 25 │   350.77 ms │                               350.24 ms │     no change │
│ QQuery 26 │    97.43 ms │                                95.91 ms │     no change │
│ QQuery 27 │  1134.57 ms │                              1136.52 ms │     no change │
│ QQuery 28 │  3476.61 ms │                              2741.32 ms │ +1.27x faster │
│ QQuery 29 │    38.89 ms │                                38.49 ms │     no change │
│ QQuery 30 │   546.18 ms │                               540.34 ms │     no change │
│ QQuery 31 │   543.49 ms │                               536.59 ms │     no change │
│ QQuery 32 │  1065.47 ms │                              1062.28 ms │     no change │
│ QQuery 33 │ 13684.39 ms │                             13865.64 ms │     no change │
│ QQuery 34 │ 13355.57 ms │                             13956.87 ms │     no change │
│ QQuery 35 │   290.50 ms │                               295.09 ms │     no change │
│ QQuery 36 │   167.90 ms │                               179.02 ms │  1.07x slower │
│ QQuery 37 │    95.13 ms │                                97.12 ms │     no change │
│ QQuery 38 │    79.01 ms │                                80.31 ms │     no change │
│ QQuery 39 │   387.28 ms │                               390.63 ms │     no change │
│ QQuery 40 │    13.65 ms │                                13.52 ms │     no change │
│ QQuery 41 │    12.90 ms │                                12.90 ms │     no change │
│ QQuery 42 │    12.48 ms │                                12.66 ms │     no change │
└───────────┴─────────────┴─────────────────────────────────────────┴───────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Benchmark Summary                                      ┃            ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ Total Time (HEAD)                                      │ 73051.50ms │
│ Total Time (rich-T-kid_regexp-replace-dict-encoding)   │ 72381.83ms │
│ Average Time (HEAD)                                    │  1698.87ms │
│ Average Time (rich-T-kid_regexp-replace-dict-encoding) │  1683.30ms │
│ Queries Faster                                         │          2 │
│ Queries Slower                                         │          1 │
│ Queries with No Change                                 │         40 │
│ Queries with Failure                                   │          0 │
└────────────────────────────────────────────────────────┴────────────┘

Distribution per query (min / mean ±stddev / max):

Comparing HEAD and rich-T-kid_regexp-replace-dict-encoding
--------------------
Benchmark clickbench_partitioned.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Query     ┃                                      HEAD ┃   rich-T-kid_regexp-replace-dict-encoding ┃        Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ QQuery 0  │              1.16 / 4.21 ±6.04 / 16.29 ms │              1.16 / 4.18 ±6.01 / 16.20 ms │     no change │
│ QQuery 1  │            11.25 / 11.35 ±0.09 / 11.51 ms │            11.26 / 11.37 ±0.08 / 11.47 ms │     no change │
│ QQuery 2  │            35.61 / 35.85 ±0.20 / 36.15 ms │            35.31 / 35.53 ±0.17 / 35.74 ms │     no change │
│ QQuery 3  │            30.85 / 31.24 ±0.68 / 32.60 ms │            30.49 / 30.60 ±0.14 / 30.85 ms │     no change │
│ QQuery 4  │         234.18 / 238.19 ±2.82 / 241.32 ms │         233.47 / 238.16 ±3.87 / 244.80 ms │     no change │
│ QQuery 5  │     1436.58 / 1470.59 ±18.08 / 1488.79 ms │     1439.34 / 1538.95 ±60.48 / 1611.20 ms │     no change │
│ QQuery 6  │               1.19 / 1.34 ±0.23 / 1.79 ms │               1.18 / 1.33 ±0.22 / 1.77 ms │     no change │
│ QQuery 7  │            12.25 / 12.36 ±0.13 / 12.61 ms │            12.47 / 12.60 ±0.11 / 12.78 ms │     no change │
│ QQuery 8  │         336.03 / 339.29 ±3.27 / 345.16 ms │         340.72 / 347.13 ±4.72 / 352.98 ms │     no change │
│ QQuery 9  │         465.64 / 477.69 ±8.87 / 492.24 ms │         475.19 / 485.51 ±5.73 / 491.15 ms │     no change │
│ QQuery 10 │         198.86 / 199.46 ±0.77 / 200.79 ms │         198.30 / 199.77 ±1.67 / 201.89 ms │     no change │
│ QQuery 11 │         209.30 / 209.87 ±0.63 / 210.96 ms │         209.41 / 210.00 ±0.57 / 211.02 ms │     no change │
│ QQuery 12 │     1502.15 / 1536.14 ±26.07 / 1582.37 ms │     1507.38 / 1583.96 ±51.34 / 1654.36 ms │     no change │
│ QQuery 13 │    2056.67 / 2254.24 ±310.52 / 2872.26 ms │    2140.43 / 2530.50 ±321.05 / 2871.12 ms │  1.12x slower │
│ QQuery 14 │     1592.92 / 1646.72 ±35.67 / 1697.81 ms │     1637.38 / 1663.74 ±41.11 / 1745.41 ms │     no change │
│ QQuery 15 │         290.58 / 299.15 ±7.49 / 309.18 ms │        290.13 / 303.90 ±12.75 / 324.62 ms │     no change │
│ QQuery 16 │    3697.70 / 3804.40 ±139.80 / 4077.46 ms │     3733.72 / 3772.44 ±42.86 / 3835.65 ms │     no change │
│ QQuery 17 │     3713.99 / 3798.40 ±86.18 / 3927.89 ms │     3666.30 / 3748.85 ±59.76 / 3826.41 ms │     no change │
│ QQuery 18 │    6864.82 / 7120.01 ±135.30 / 7239.99 ms │    6299.68 / 7024.64 ±440.62 / 7452.49 ms │     no change │
│ QQuery 19 │           26.56 / 36.10 ±18.43 / 72.96 ms │            26.66 / 26.92 ±0.33 / 27.57 ms │ +1.34x faster │
│ QQuery 20 │     1037.55 / 1057.94 ±24.08 / 1104.13 ms │      1041.06 / 1054.65 ±9.74 / 1067.32 ms │     no change │
│ QQuery 21 │     1351.25 / 1369.53 ±14.17 / 1393.32 ms │      1359.46 / 1363.96 ±4.04 / 1370.62 ms │     no change │
│ QQuery 22 │     3230.45 / 3273.85 ±36.89 / 3339.99 ms │     3151.37 / 3222.07 ±38.72 / 3270.24 ms │     no change │
│ QQuery 23 │     9267.09 / 9351.05 ±82.30 / 9486.42 ms │    9038.36 / 9284.14 ±159.86 / 9538.25 ms │     no change │
│ QQuery 24 │        94.65 / 182.33 ±172.24 / 526.79 ms │         96.15 / 141.14 ±72.72 / 284.47 ms │ +1.29x faster │
│ QQuery 25 │         350.77 / 352.20 ±1.19 / 353.83 ms │         350.24 / 353.37 ±3.55 / 360.16 ms │     no change │
│ QQuery 26 │           97.43 / 98.40 ±1.20 / 100.72 ms │            95.91 / 97.65 ±1.20 / 99.48 ms │     no change │
│ QQuery 27 │     1134.57 / 1148.91 ±17.33 / 1182.78 ms │     1136.52 / 1150.02 ±13.47 / 1174.86 ms │     no change │
│ QQuery 28 │     3476.61 / 3544.32 ±40.08 / 3579.65 ms │     2741.32 / 2800.09 ±43.51 / 2864.19 ms │ +1.27x faster │
│ QQuery 29 │           38.89 / 60.75 ±22.80 / 91.47 ms │           38.49 / 62.62 ±21.56 / 90.78 ms │     no change │
│ QQuery 30 │         546.18 / 552.90 ±4.33 / 558.29 ms │         540.34 / 547.97 ±5.17 / 555.72 ms │     no change │
│ QQuery 31 │         543.49 / 552.22 ±7.68 / 564.60 ms │        536.59 / 552.31 ±12.00 / 565.30 ms │     no change │
│ QQuery 32 │    1065.47 / 1174.00 ±115.98 / 1351.18 ms │     1062.28 / 1115.55 ±57.91 / 1209.30 ms │     no change │
│ QQuery 33 │ 13684.39 / 14354.80 ±743.17 / 15769.05 ms │ 13865.64 / 14520.64 ±657.24 / 15724.42 ms │     no change │
│ QQuery 34 │ 13355.57 / 14494.34 ±660.65 / 15383.50 ms │ 13956.87 / 14354.95 ±267.31 / 14682.43 ms │     no change │
│ QQuery 35 │        290.50 / 326.43 ±62.81 / 451.78 ms │        295.09 / 333.07 ±51.25 / 431.02 ms │     no change │
│ QQuery 36 │        167.90 / 182.89 ±13.61 / 202.02 ms │         179.02 / 190.48 ±8.04 / 201.86 ms │     no change │
│ QQuery 37 │           95.13 / 99.99 ±4.64 / 107.75 ms │          97.12 / 101.44 ±2.58 / 103.80 ms │     no change │
│ QQuery 38 │            79.01 / 82.96 ±4.55 / 91.63 ms │            80.31 / 82.85 ±1.92 / 85.52 ms │     no change │
│ QQuery 39 │         387.28 / 401.39 ±8.12 / 408.69 ms │         390.63 / 398.53 ±6.08 / 404.67 ms │     no change │
│ QQuery 40 │            13.65 / 14.22 ±0.69 / 15.49 ms │            13.52 / 14.13 ±0.67 / 15.44 ms │     no change │
│ QQuery 41 │            12.90 / 13.28 ±0.37 / 13.93 ms │            12.90 / 13.09 ±0.17 / 13.32 ms │     no change │
│ QQuery 42 │            12.48 / 12.67 ±0.15 / 12.94 ms │            12.66 / 17.95 ±6.79 / 29.31 ms │  1.42x slower │
└───────────┴───────────────────────────────────────────┴───────────────────────────────────────────┴───────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Benchmark Summary                                      ┃            ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ Total Time (HEAD)                                      │ 76227.94ms │
│ Total Time (rich-T-kid_regexp-replace-dict-encoding)   │ 75542.75ms │
│ Average Time (HEAD)                                    │  1772.74ms │
│ Average Time (rich-T-kid_regexp-replace-dict-encoding) │  1756.81ms │
│ Queries Faster                                         │          3 │
│ Queries Slower                                         │          2 │
│ Queries with No Change                                 │         38 │
│ Queries with Failure                                   │          0 │
└────────────────────────────────────────────────────────┴────────────┘

Memory Pool Peaks

Peak MemoryPool reservation per query — what DataFusion's accounting believes it reserved. Recorded only for benchmarks that write a results JSON (the dfbench suites, and the suites bench.sh runs through the Criterion SQL harness since #25644), and only under a memory limit: DATAFUSION_RUNTIME_MEMORY_LIMIT, or one the suite sets itself.

Base: 334f293 (merge-base) | Changed: rich-T-kid/regexp-replace-dict-encoding

clickbench_partitioned

Query Base Changed Change
Query 0 0 B 0 B 0.0%
Query 1 104 B 104 B +0.0%
Query 2 936 B 936 B +0.0%
Query 3 312 B 312 B +0.0%
Query 4 757.2 MiB 775.0 MiB +2.4%
Query 5 1.4 GiB 1.4 GiB -0.5%
Query 6 0 B 0 B 0.0%
Query 7 50.0 MiB 70.2 MiB +40.3%
Query 8 967.2 MiB 954.5 MiB -1.3%
Query 9 635.7 MiB 593.7 MiB -6.6%
Query 10 71.4 MiB 73.3 MiB +2.6%
Query 11 75.6 MiB 79.5 MiB +5.2%
Query 12 1.6 GiB 1.6 GiB +2.0%
Query 13 1.9 GiB 1.9 GiB +0.0%
Query 14 1.9 GiB 1.9 GiB -0.0%
Query 15 1.1 GiB 1.2 GiB +8.5%
Query 16 3.4 GiB 3.3 GiB -2.3%
Query 17 3.3 GiB 3.4 GiB +1.7%
Query 18 7.4 GiB 7.4 GiB +0.0%
Query 19 0 B 0 B 0.0%
Query 20 104 B 104 B +0.0%
Query 21 1.3 MiB 1.5 MiB +17.4%
Query 22 2.4 MiB 2.4 MiB +0.7%
Query 23 12.7 MiB 12.2 MiB -3.5%
Query 24 6.0 MiB 6.4 MiB +7.4%
Query 25 8.1 MiB 7.6 MiB -6.9%
Query 26 7.4 MiB 8.0 MiB +7.9%
Query 27 2.5 MiB 2.5 MiB +0.0%
Query 28 1.6 GiB 2.0 GiB +22.2%
Query 29 624 B 624 B +0.0%
Query 30 683.1 MiB 649.3 MiB -4.9%
Query 31 1.5 GiB 1.5 GiB -3.1%
Query 32 7.1 GiB 7.2 GiB +0.2%
Query 33 12.7 GiB 12.7 GiB +0.0%
Query 34 12.3 GiB 12.7 GiB +3.5%
Query 35 613.1 MiB 598.4 MiB -2.4%
Query 36 474.1 MiB 474.1 MiB +0.0%
Query 37 8.7 MiB 8.1 MiB -6.7%
Query 38 5.3 MiB 5.3 MiB -0.7%
Query 39 450.8 MiB 459.9 MiB +2.0%
Query 40 2.3 MiB 2.3 MiB -0.2%
Query 41 3.1 MiB 3.1 MiB -0.1%
Query 42 1.6 MiB 1.6 MiB +0.4%

Pool accounting vs. process RSS

Max pool peak is the largest reservation any single query in the run reached; peak RSS covers the whole invocation, including data loading and allocator retention, and the two high-water marks need not coincide in time. The gap is therefore an upper bound on what the pool did not account for, not a measurement of it.

Benchmark Side Max pool peak Peak RSS Gap RSS / pool
clickbench_partitioned base (334f293 (merge-base)) 12.7 GiB 13.0 GiB 298.1 MiB 1.0×
clickbench_partitioned changed (rich-T-kid/regexp-replace-dict-encoding) 12.7 GiB 12.7 GiB −62.8 MiB 1.0×
Resource Usage

clickbench_partitioned — base (merge-base)

Metric Value
Wall time 385.1s
Peak memory 13.0 GiB
Avg memory 6.1 GiB
CPU user 3365.2s
CPU sys 203.1s
Peak spill 0 B

clickbench_partitioned — branch

Metric Value
Wall time 380.1s
Peak memory 12.7 GiB
Avg memory 6.0 GiB
CPU user 3300.7s
CPU sys 206.7s
Peak spill 0 B

File an issue against this benchmark runner

@Rich-T-kid

Copy link
Copy Markdown
Contributor Author

TODO fix the benchmark run. the baseline needs to be latest main with the flag enabled and the changed needs to be this branch with the flag enabled

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark completed (GKE) | trigger

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

Comparing rich-T-kid/regexp-replace-dict-encoding (7a2ee99) to 334f293 (merge-base) diff

Run configuration
run benchmark clickbench_partitioned
env:
  DATAFUSION_RUNTIME_MEMORY_LIMIT: "32G"
baseline:
  env:
    DATAFUSION_EXECUTION_PARQUET_ENABLE_RLE_TO_DICTIONARY: "true"
changed:
  env:
    DATAFUSION_EXECUTION_PARQUET_ENABLE_RLE_TO_DICTIONARY: "true"
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 rich-T-kid_regexp-replace-dict-encoding
--------------------
Benchmark clickbench_partitioned.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Query     ┃        HEAD ┃ rich-T-kid_regexp-replace-dict-encoding ┃        Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ QQuery 0  │     1.21 ms │                                 1.20 ms │     no change │
│ QQuery 1  │    11.70 ms │                                11.53 ms │     no change │
│ QQuery 2  │    36.56 ms │                                36.10 ms │     no change │
│ QQuery 3  │    32.22 ms │                                32.05 ms │     no change │
│ QQuery 4  │   253.98 ms │                               248.52 ms │     no change │
│ QQuery 5  │  1504.11 ms │                              1518.66 ms │     no change │
│ QQuery 6  │     1.26 ms │                                 1.25 ms │     no change │
│ QQuery 7  │    13.01 ms │                                13.07 ms │     no change │
│ QQuery 8  │   349.27 ms │                               356.34 ms │     no change │
│ QQuery 9  │   497.83 ms │                               510.29 ms │     no change │
│ QQuery 10 │   201.30 ms │                               200.86 ms │     no change │
│ QQuery 11 │   212.62 ms │                               212.90 ms │     no change │
│ QQuery 12 │  1575.24 ms │                              1536.23 ms │     no change │
│ QQuery 13 │  2164.49 ms │                              2198.90 ms │     no change │
│ QQuery 14 │  1694.67 ms │                              1701.18 ms │     no change │
│ QQuery 15 │   311.62 ms │                               305.90 ms │     no change │
│ QQuery 16 │  3607.63 ms │                              3783.44 ms │     no change │
│ QQuery 17 │  3737.19 ms │                              3895.86 ms │     no change │
│ QQuery 18 │  6835.82 ms │                              6634.24 ms │     no change │
│ QQuery 19 │    28.09 ms │                                27.78 ms │     no change │
│ QQuery 20 │  1071.41 ms │                              1061.35 ms │     no change │
│ QQuery 21 │  1380.63 ms │                              1384.00 ms │     no change │
│ QQuery 22 │  3263.96 ms │                              3244.99 ms │     no change │
│ QQuery 23 │  9348.93 ms │                              9264.15 ms │     no change │
│ QQuery 24 │    97.47 ms │                                96.90 ms │     no change │
│ QQuery 25 │   354.80 ms │                               356.29 ms │     no change │
│ QQuery 26 │    98.53 ms │                                97.73 ms │     no change │
│ QQuery 27 │  1173.51 ms │                              1161.04 ms │     no change │
│ QQuery 28 │  3580.24 ms │                              2774.90 ms │ +1.29x faster │
│ QQuery 29 │    39.96 ms │                                39.33 ms │     no change │
│ QQuery 30 │   561.18 ms │                               548.77 ms │     no change │
│ QQuery 31 │   559.13 ms │                               548.51 ms │     no change │
│ QQuery 32 │  1035.41 ms │                              1049.01 ms │     no change │
│ QQuery 33 │ 13764.13 ms │                             14123.50 ms │     no change │
│ QQuery 34 │ 14540.11 ms │                             14051.62 ms │     no change │
│ QQuery 35 │   308.79 ms │                               319.43 ms │     no change │
│ QQuery 36 │   175.59 ms │                               177.41 ms │     no change │
│ QQuery 37 │    97.03 ms │                                98.97 ms │     no change │
│ QQuery 38 │    81.07 ms │                                82.72 ms │     no change │
│ QQuery 39 │   406.37 ms │                               423.27 ms │     no change │
│ QQuery 40 │    14.61 ms │                                14.96 ms │     no change │
│ QQuery 41 │    14.16 ms │                                14.30 ms │     no change │
│ QQuery 42 │    13.37 ms │                                13.92 ms │     no change │
└───────────┴─────────────┴─────────────────────────────────────────┴───────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Benchmark Summary                                      ┃            ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ Total Time (HEAD)                                      │ 75050.23ms │
│ Total Time (rich-T-kid_regexp-replace-dict-encoding)   │ 74173.36ms │
│ Average Time (HEAD)                                    │  1745.35ms │
│ Average Time (rich-T-kid_regexp-replace-dict-encoding) │  1724.96ms │
│ Queries Faster                                         │          1 │
│ Queries Slower                                         │          0 │
│ Queries with No Change                                 │         42 │
│ Queries with Failure                                   │          0 │
└────────────────────────────────────────────────────────┴────────────┘

Distribution per query (min / mean ±stddev / max):

Comparing HEAD and rich-T-kid_regexp-replace-dict-encoding
--------------------
Benchmark clickbench_partitioned.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Query     ┃                                      HEAD ┃   rich-T-kid_regexp-replace-dict-encoding ┃        Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ QQuery 0  │              1.21 / 4.55 ±6.48 / 17.51 ms │              1.20 / 4.53 ±6.51 / 17.54 ms │     no change │
│ QQuery 1  │            11.70 / 12.29 ±0.48 / 13.04 ms │            11.53 / 11.94 ±0.21 / 12.10 ms │     no change │
│ QQuery 2  │            36.56 / 37.06 ±0.54 / 38.07 ms │            36.10 / 36.30 ±0.16 / 36.58 ms │     no change │
│ QQuery 3  │            32.22 / 33.05 ±0.70 / 34.35 ms │            32.05 / 32.31 ±0.34 / 32.97 ms │     no change │
│ QQuery 4  │         253.98 / 260.52 ±4.13 / 265.96 ms │         248.52 / 252.00 ±4.05 / 259.41 ms │     no change │
│ QQuery 5  │     1504.11 / 1588.36 ±43.87 / 1632.69 ms │     1518.66 / 1587.81 ±59.31 / 1696.42 ms │     no change │
│ QQuery 6  │               1.26 / 1.41 ±0.23 / 1.86 ms │               1.25 / 1.41 ±0.23 / 1.86 ms │     no change │
│ QQuery 7  │            13.01 / 13.16 ±0.11 / 13.34 ms │            13.07 / 13.27 ±0.26 / 13.77 ms │     no change │
│ QQuery 8  │         349.27 / 362.18 ±7.83 / 371.19 ms │         356.34 / 361.23 ±6.34 / 373.35 ms │     no change │
│ QQuery 9  │        497.83 / 519.32 ±21.32 / 556.22 ms │         510.29 / 520.90 ±8.34 / 534.04 ms │     no change │
│ QQuery 10 │         201.30 / 202.87 ±2.23 / 207.29 ms │         200.86 / 202.43 ±1.60 / 205.30 ms │     no change │
│ QQuery 11 │         212.62 / 213.50 ±0.48 / 214.10 ms │         212.90 / 213.41 ±0.56 / 214.42 ms │     no change │
│ QQuery 12 │     1575.24 / 1645.45 ±53.42 / 1729.71 ms │     1536.23 / 1590.01 ±42.17 / 1665.90 ms │     no change │
│ QQuery 13 │    2164.49 / 2707.75 ±371.33 / 3134.53 ms │    2198.90 / 2633.19 ±356.18 / 2986.40 ms │     no change │
│ QQuery 14 │     1694.67 / 1732.88 ±38.67 / 1798.62 ms │     1701.18 / 1764.65 ±38.53 / 1821.76 ms │     no change │
│ QQuery 15 │         311.62 / 322.19 ±7.75 / 333.99 ms │         305.90 / 312.28 ±7.29 / 325.37 ms │     no change │
│ QQuery 16 │    3607.63 / 3871.15 ±175.99 / 4119.79 ms │     3783.44 / 3864.13 ±58.28 / 3920.49 ms │     no change │
│ QQuery 17 │    3737.19 / 3910.63 ±137.59 / 4119.16 ms │     3895.86 / 3991.93 ±75.27 / 4121.48 ms │     no change │
│ QQuery 18 │    6835.82 / 7048.04 ±125.34 / 7175.45 ms │    6634.24 / 7092.89 ±272.67 / 7399.60 ms │     no change │
│ QQuery 19 │           28.09 / 38.46 ±15.80 / 69.27 ms │            27.78 / 29.45 ±2.41 / 34.18 ms │ +1.31x faster │
│ QQuery 20 │      1071.41 / 1083.39 ±9.36 / 1091.44 ms │      1061.35 / 1067.01 ±3.45 / 1071.52 ms │     no change │
│ QQuery 21 │      1380.63 / 1393.42 ±9.59 / 1409.31 ms │      1384.00 / 1394.49 ±6.17 / 1400.72 ms │     no change │
│ QQuery 22 │     3263.96 / 3295.35 ±36.46 / 3351.65 ms │     3244.99 / 3303.83 ±57.38 / 3409.44 ms │     no change │
│ QQuery 23 │    9348.93 / 9499.78 ±108.95 / 9649.83 ms │    9264.15 / 9596.00 ±256.97 / 9889.14 ms │     no change │
│ QQuery 24 │         97.47 / 141.68 ±85.14 / 311.96 ms │         96.90 / 118.68 ±32.40 / 181.51 ms │ +1.19x faster │
│ QQuery 25 │         354.80 / 356.71 ±1.47 / 358.72 ms │         356.29 / 357.75 ±1.23 / 359.31 ms │     no change │
│ QQuery 26 │            98.53 / 99.19 ±0.59 / 99.90 ms │           97.73 / 99.04 ±1.04 / 100.27 ms │     no change │
│ QQuery 27 │     1173.51 / 1199.50 ±25.93 / 1247.00 ms │      1161.04 / 1171.76 ±5.78 / 1178.07 ms │     no change │
│ QQuery 28 │     3580.24 / 3621.68 ±30.81 / 3665.29 ms │     2774.90 / 2867.97 ±49.64 / 2924.35 ms │ +1.26x faster │
│ QQuery 29 │            39.96 / 44.22 ±8.05 / 60.31 ms │           39.33 / 47.41 ±15.71 / 78.83 ms │  1.07x slower │
│ QQuery 30 │         561.18 / 566.88 ±5.20 / 575.90 ms │         548.77 / 556.11 ±5.51 / 564.63 ms │     no change │
│ QQuery 31 │        559.13 / 577.40 ±20.05 / 611.60 ms │        548.51 / 558.90 ±13.09 / 583.17 ms │     no change │
│ QQuery 32 │     1035.41 / 1084.60 ±47.02 / 1172.89 ms │     1049.01 / 1087.21 ±31.96 / 1141.81 ms │     no change │
│ QQuery 33 │ 13764.13 / 15049.90 ±982.33 / 16784.43 ms │ 14123.50 / 14533.52 ±260.72 / 14882.79 ms │     no change │
│ QQuery 34 │ 14540.11 / 15087.50 ±475.64 / 15821.94 ms │ 14051.62 / 14665.45 ±459.31 / 15305.97 ms │     no change │
│ QQuery 35 │        308.79 / 364.21 ±96.75 / 557.55 ms │        319.43 / 368.95 ±76.52 / 520.86 ms │     no change │
│ QQuery 36 │        175.59 / 198.32 ±20.88 / 235.49 ms │        177.41 / 197.91 ±22.36 / 232.87 ms │     no change │
│ QQuery 37 │          97.03 / 102.14 ±6.89 / 115.50 ms │          98.97 / 102.07 ±3.92 / 108.89 ms │     no change │
│ QQuery 38 │            81.07 / 84.50 ±2.91 / 89.04 ms │            82.72 / 84.32 ±1.22 / 85.97 ms │     no change │
│ QQuery 39 │        406.37 / 424.84 ±11.70 / 442.37 ms │        423.27 / 433.31 ±10.10 / 448.98 ms │     no change │
│ QQuery 40 │            14.61 / 14.98 ±0.40 / 15.70 ms │            14.96 / 15.34 ±0.39 / 15.98 ms │     no change │
│ QQuery 41 │            14.16 / 16.83 ±4.98 / 26.79 ms │            14.30 / 16.35 ±2.99 / 22.26 ms │     no change │
│ QQuery 42 │            13.37 / 15.68 ±4.09 / 23.86 ms │            13.92 / 14.17 ±0.14 / 14.31 ms │ +1.11x faster │
└───────────┴───────────────────────────────────────────┴───────────────────────────────────────────┴───────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Benchmark Summary                                      ┃            ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ Total Time (HEAD)                                      │ 78847.56ms │
│ Total Time (rich-T-kid_regexp-replace-dict-encoding)   │ 77173.64ms │
│ Average Time (HEAD)                                    │  1833.66ms │
│ Average Time (rich-T-kid_regexp-replace-dict-encoding) │  1794.74ms │
│ Queries Faster                                         │          4 │
│ Queries Slower                                         │          1 │
│ Queries with No Change                                 │         38 │
│ Queries with Failure                                   │          0 │
└────────────────────────────────────────────────────────┴────────────┘

Memory Pool Peaks

Peak MemoryPool reservation per query — what DataFusion's accounting believes it reserved. Recorded only for benchmarks that write a results JSON (the dfbench suites, and the suites bench.sh runs through the Criterion SQL harness since #25644), and only under a memory limit: DATAFUSION_RUNTIME_MEMORY_LIMIT, or one the suite sets itself.

Base: 334f293 (merge-base) | Changed: rich-T-kid/regexp-replace-dict-encoding

clickbench_partitioned

Query Base Changed Change
Query 0 0 B 0 B 0.0%
Query 1 104 B 104 B +0.0%
Query 2 936 B 936 B +0.0%
Query 3 312 B 312 B +0.0%
Query 4 770.4 MiB 756.2 MiB -1.8%
Query 5 1.4 GiB 1.4 GiB -1.1%
Query 6 0 B 0 B 0.0%
Query 7 50.1 MiB 60.0 MiB +19.8%
Query 8 944.6 MiB 945.7 MiB +0.1%
Query 9 593.5 MiB 551.8 MiB -7.0%
Query 10 72.6 MiB 74.0 MiB +1.9%
Query 11 77.9 MiB 77.8 MiB -0.1%
Query 12 1.6 GiB 1.6 GiB +1.5%
Query 13 1.9 GiB 1.9 GiB +0.8%
Query 14 1.9 GiB 1.9 GiB +0.0%
Query 15 1.1 GiB 1.1 GiB +0.4%
Query 16 3.4 GiB 3.4 GiB +2.1%
Query 17 3.4 GiB 3.2 GiB -6.0%
Query 18 7.4 GiB 7.4 GiB +0.5%
Query 19 0 B 0 B 0.0%
Query 20 104 B 104 B +0.0%
Query 21 1.5 MiB 1.3 MiB -12.7%
Query 22 2.5 MiB 2.5 MiB -0.5%
Query 23 12.9 MiB 12.9 MiB +0.7%
Query 24 6.7 MiB 6.3 MiB -6.7%
Query 25 8.1 MiB 6.9 MiB -15.0%
Query 26 7.9 MiB 7.8 MiB -1.4%
Query 27 2.5 MiB 2.5 MiB +0.0%
Query 28 1.7 GiB 1.9 GiB +15.8%
Query 29 624 B 624 B +0.0%
Query 30 691.2 MiB 659.5 MiB -4.6%
Query 31 1.5 GiB 1.5 GiB +1.6%
Query 32 7.1 GiB 7.1 GiB +0.0%
Query 33 12.7 GiB 12.7 GiB +0.3%
Query 34 12.3 GiB 12.8 GiB +4.1%
Query 35 614.4 MiB 606.4 MiB -1.3%
Query 36 474.1 MiB 474.1 MiB +0.0%
Query 37 8.7 MiB 8.1 MiB -6.8%
Query 38 4.7 MiB 5.3 MiB +11.4%
Query 39 450.8 MiB 450.8 MiB +0.0%
Query 40 2.3 MiB 2.3 MiB -2.9%
Query 41 3.1 MiB 3.1 MiB -0.1%
Query 42 1.7 MiB 1.7 MiB -0.1%

Pool accounting vs. process RSS

Max pool peak is the largest reservation any single query in the run reached; peak RSS covers the whole invocation, including data loading and allocator retention, and the two high-water marks need not coincide in time. The gap is therefore an upper bound on what the pool did not account for, not a measurement of it.

Benchmark Side Max pool peak Peak RSS Gap RSS / pool
clickbench_partitioned base (334f293 (merge-base)) 12.7 GiB 13.2 GiB 480.3 MiB 1.0×
clickbench_partitioned changed (rich-T-kid/regexp-replace-dict-encoding) 12.8 GiB 13.4 GiB 590.6 MiB 1.0×
Resource Usage

clickbench_partitioned — base (merge-base)

Metric Value
Wall time 395.1s
Peak memory 13.2 GiB
Avg memory 6.0 GiB
CPU user 3429.0s
CPU sys 211.1s
Peak spill 0 B

clickbench_partitioned — branch

Metric Value
Wall time 390.1s
Peak memory 13.4 GiB
Avg memory 6.1 GiB
CPU user 3356.7s
CPU sys 209.2s
Peak spill 0 B

File an issue against this benchmark runner

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark completed (GKE) | trigger

Instance: c4a-highcpu-48 (12 vCPU / 65 GiB)

Comparing rich-T-kid/regexp-replace-dict-encoding (7a2ee99) to 334f293 (merge-base) diff

Run configuration
run benchmark wide_schema
env:
  DATAFUSION_RUNTIME_MEMORY_LIMIT: "32G"
baseline:
  env:
    DATAFUSION_EXECUTION_PARQUET_ENABLE_RLE_TO_DICTIONARY: "true"
changed:
  env:
    DATAFUSION_EXECUTION_PARQUET_ENABLE_RLE_TO_DICTIONARY: "true"
CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  48
On-line CPU(s) list:                     0-47
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     48
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:                               3 MiB (48 instances)
L1i cache:                               3 MiB (48 instances)
L2 cache:                                96 MiB (48 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-47
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

group                     HEAD                                   rich-T-kid_regexp-replace-dict-encoding
-----                     ----                                   ---------------------------------------
wide_schema/Q01_narrow    1.01     94.2±0.36ms        ? ?/sec    1.00     93.7±0.25ms        ? ?/sec
wide_schema/Q01_wide      1.00   1100.3±8.20ms        ? ?/sec    1.00   1095.0±4.19ms        ? ?/sec
wide_schema/Q02_narrow    1.00      5.8±0.11ms        ? ?/sec    1.00      5.9±0.07ms        ? ?/sec
wide_schema/Q02_wide      1.00    900.7±3.27ms        ? ?/sec    1.00    900.3±3.05ms        ? ?/sec
wide_schema/Q03_narrow    1.00     14.5±0.27ms        ? ?/sec    1.05     15.2±0.18ms        ? ?/sec
wide_schema/Q03_wide      1.00    920.8±3.14ms        ? ?/sec    1.00    922.3±3.51ms        ? ?/sec
wide_schema/Q04_narrow    1.00     32.8±0.29ms        ? ?/sec    1.01     33.0±0.15ms        ? ?/sec
wide_schema/Q04_wide      1.00   1044.5±5.37ms        ? ?/sec    1.00   1040.2±7.65ms        ? ?/sec

Memory Pool Peaks

Peak MemoryPool reservation per query — what DataFusion's accounting believes it reserved. Recorded only for benchmarks that write a results JSON (the dfbench suites, and the suites bench.sh runs through the Criterion SQL harness since #25644), and only under a memory limit: DATAFUSION_RUNTIME_MEMORY_LIMIT, or one the suite sets itself.

Base: 334f293 (merge-base) | Changed: rich-T-kid/regexp-replace-dict-encoding

wide_schema — wide_schema_narrow

Query Base Changed Change
wide_schema/Q01_narrow 9.4 MiB 9.4 MiB -0.0%
wide_schema/Q02_narrow 0 B 0 B 0.0%
wide_schema/Q03_narrow 0 B 0 B 0.0%
wide_schema/Q04_narrow 0 B 0 B 0.0%

wide_schema — wide_schema_wide

Query Base Changed Change
wide_schema/Q01_wide 9.4 MiB 9.4 MiB -0.0%
wide_schema/Q02_wide 0 B 0 B 0.0%
wide_schema/Q03_wide 0 B 0 B 0.0%
wide_schema/Q04_wide 0 B 0 B 0.0%

Pool accounting vs. process RSS

Max pool peak is the largest reservation any single query in the run reached; peak RSS covers the whole invocation, including data loading and allocator retention, and the two high-water marks need not coincide in time. The gap is therefore an upper bound on what the pool did not account for, not a measurement of it.

Benchmark Side Max pool peak Peak RSS Gap RSS / pool
wide_schema base (334f293 (merge-base)) 9.4 MiB 972.7 MiB 963.4 MiB 103.9×
wide_schema changed (rich-T-kid/regexp-replace-dict-encoding) 9.4 MiB 1021.6 MiB 1012.3 MiB 109.1×
Resource Usage

wide_schema — base (merge-base)

Metric Value
Wall time 635.5s
Peak memory 972.7 MiB
Avg memory 139.0 MiB
CPU user 424.0s
CPU sys 59.5s
Peak spill 0 B

wide_schema — branch

Metric Value
Wall time 670.5s
Peak memory 1021.6 MiB
Avg memory 135.6 MiB
CPU user 419.8s
CPU sys 60.0s
Peak spill 0 B

File an issue against this benchmark runner

@Rich-T-kid

Copy link
Copy Markdown
Contributor Author

actually no thats exactly what this does #26186 (comment), this is the exact query this PR targets https://github.com/apache/datafusion/blob/main/benchmarks/queries/clickbench/queries/q28.sql

@Rich-T-kid

Copy link
Copy Markdown
Contributor Author

@kumarUjjawal would you mind taking a look at this as its related to #24111

this comment also provides some context #26186 (comment)

@kumarUjjawal

Copy link
Copy Markdown
Contributor

@kumarUjjawal would you mind taking a look at this as its related to #24111

this comment also provides some context #26186 (comment)

Thank you @Rich-T-kid for working on this. I'm currently on vacation. I will get to it when I return.

kumarUjjawal

This comment was marked as duplicate.

Comment thread datafusion/functions/src/regex/regexpreplace.rs Outdated

@kumarUjjawal kumarUjjawal left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good 👍

&& let DataType::Dictionary(_, value_type) = array.data_type().clone()
{
if preserve_dictionary {
let dict = array.as_any_dictionary();

@jayzhan211 jayzhan211 Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This runs the regex over every value in the dictionary, including values no row references. After a filter, or with a Parquet dictionary shared across batches, that can be much larger than the batch. In a same-build microbench (URL-shaped values, the Q28 pattern) I measured 5.3x slower than the old cast path at 50k values / 8192 rows, and 34x slower at 50k values / 1000 rows.

Compacting the dictionary first fixes it. With this change every case I tried was ≤1.01x the old path, and the small-dictionary win stays:

             if preserve_dictionary {
-                let dict = array.as_any_dictionary();
+                // A filtered batch or a shared Parquet dictionary can hold far more
+                // values than rows; drop unreferenced values so the regex runs at
+                // most once per row.
+                let compacted;
+                let mut dict = array.as_any_dictionary();
+                if dict.values().len() > dict.keys().len() {
+                    compacted = garbage_collect_any_dictionary(dict)?;
+                    dict = compacted.as_any_dictionary();
+                }

with use arrow_select::dictionary::garbage_collect_any_dictionary; and arrow-select = { workspace = true } added to datafusion/functions/Cargo.toml.

This is the same cost issue as the substr fast path in #25874, and #26696 discusses handling it once for all functions that map over dictionary values, so this guard may later move into a shared helper.

Utf8bd

statement ok
DROP TABLE regexp_replace_dict_runtime_scalars;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could you add a few cases for the other dictionary value types and the non-literal fallback? Dictionary(Int32, Utf8View) used to be a plan error and now works, and Binary values now come back as Dictionary(Int32, Utf8). I checked these locally and they all return the right values. Fine to do in a follow-up if you prefer.

CREATE TABLE t AS SELECT
  arrow_cast(column1, 'Dictionary(Int32, LargeUtf8)') AS dl,
  arrow_cast(column1, 'Dictionary(Int32, Utf8View)') AS dv,
  arrow_cast(column1, 'Dictionary(Int32, Binary)') AS db,
  arrow_cast(column1, 'Dictionary(Int32, Utf8)') AS d8,
  column1 AS s
FROM (VALUES ('abc'), ('abd'), (NULL)) AS v;

-- expect Dictionary(Int32, LargeUtf8) / Dictionary(Int32, Utf8View) / Dictionary(Int32, Utf8)
SELECT arrow_typeof(regexp_replace(dl, 'a', 'x')), regexp_replace(dl, 'a', 'x') FROM t;
SELECT arrow_typeof(regexp_replace(dv, 'a', 'x')), regexp_replace(dv, 'a', 'x') FROM t;
SELECT arrow_typeof(regexp_replace(db, 'a', 'x')), regexp_replace(db, 'a', 'x') FROM t;

-- non-literal pattern: expect Utf8
SELECT arrow_typeof(regexp_replace(d8, s, 'x')), regexp_replace(d8, s, 'x') FROM t;

@alamb

alamb commented Oct 24, 2026

Copy link
Copy Markdown
Contributor

This PR appears to be waiting on the author to respond to reviewer feedback so marking as draft. Please mark ready to review when it is ready for another look

@alamb
alamb marked this pull request as draft October 24, 2026 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

functions Changes to functions implementation sqllogictest SQL Logic Tests (.slt)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dictionary performance improvement tickets

6 participants