Repository navigation
feat(optimizer): preserve profitable Parquet dictionaries for aggregation - #26789
Rich-T-kid wants to merge 13 commits into
Conversation
53391c9 to
f63f7dd
Compare
f63f7dd to
3a1dc8e
Compare
|
run benchmark clickbench_partitioned env:
DATAFUSION_RUNTIME_MEMORY_LIMIT: "32G"
DATAFUSION_EXECUTION_PARQUET_ENABLE_RLE_TO_DICTIONARY: "true" |
|
🤖 Benchmark running (GKE) | trigger CPU Details (lscpu)Comparing rich-T-kid/wip-cost-based-parquet-dictionary (3a1dc8e) to c18e5d9 (merge-base) diff Run configurationrun benchmark clickbench_partitioned
env:
DATAFUSION_EXECUTION_PARQUET_ENABLE_RLE_TO_DICTIONARY: "true"
DATAFUSION_RUNTIME_MEMORY_LIMIT: "32G"Results will be posted here when complete File an issue against this benchmark runner |
|
show benchmark queue |
|
Hi @Rich-T-kid, you asked to view the benchmark queue (#26789 (comment)).
File an issue against this benchmark runner |
|
🤖 Benchmark completed (GKE) | trigger Instance: Comparing rich-T-kid/wip-cost-based-parquet-dictionary (3a1dc8e) to c18e5d9 (merge-base) diff Run configurationrun benchmark clickbench_partitioned
env:
DATAFUSION_EXECUTION_PARQUET_ENABLE_RLE_TO_DICTIONARY: "true"
DATAFUSION_RUNTIME_MEMORY_LIMIT: "32G"CPU Details (lscpu)Details
Memory Pool PeaksPeak Base:
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.
Resource Usageclickbench_partitioned — base (merge-base)
clickbench_partitioned — branch
File an issue against this benchmark runner |
|
run benchmark tpch tpcds wide_schema env:
DATAFUSION_RUNTIME_MEMORY_LIMIT: "32G"
DATAFUSION_EXECUTION_PARQUET_ENABLE_RLE_TO_DICTIONARY: "true" |
|
show benchmark queue |
|
Hi @Rich-T-kid, you asked to view the benchmark queue (#26789 (comment)).
File an issue against this benchmark runner |
|
show benchmark queue |
|
Hi @Rich-T-kid, you asked to view the benchmark queue (#26789 (comment)).
File an issue against this benchmark runner |
|
🤖 Benchmark running (GKE) | trigger CPU Details (lscpu)Comparing c37a2aa (c37a2aa) to c37a2aa diff Run configurationrun benchmark tpcds
env:
DATAFUSION_EXECUTION_PARQUET_SCHEMA_FORCE_VIEW_TYPES: "true"
DATAFUSION_OPTIMIZER_ENABLE_DICTIONARY_PRESERVATION: "false"
DATAFUSION_RUNTIME_MEMORY_LIMIT: "32G"
baseline:
ref: "c37a2aada6b21adc699c3fd6d1ddb648c130ec84"
env:
DATAFUSION_EXECUTION_PARQUET_ENABLE_RLE_TO_DICTIONARY: "false"
changed:
ref: "c37a2aada6b21adc699c3fd6d1ddb648c130ec84"
env:
DATAFUSION_EXECUTION_PARQUET_ENABLE_RLE_TO_DICTIONARY: "true"
resources:
cpu: "12"
memory: "65Gi"
arch: "arm64"Results will be posted here when complete File an issue against this benchmark runner |
|
🤖 Benchmark running (GKE) | trigger CPU Details (lscpu)Comparing c37a2aa (c37a2aa) to c37a2aa diff Run configurationrun benchmark clickbench_partitioned
env:
DATAFUSION_EXECUTION_PARQUET_SCHEMA_FORCE_VIEW_TYPES: "true"
DATAFUSION_OPTIMIZER_ENABLE_DICTIONARY_PRESERVATION: "false"
DATAFUSION_RUNTIME_MEMORY_LIMIT: "32G"
baseline:
ref: "c37a2aada6b21adc699c3fd6d1ddb648c130ec84"
env:
DATAFUSION_EXECUTION_PARQUET_ENABLE_RLE_TO_DICTIONARY: "false"
changed:
ref: "c37a2aada6b21adc699c3fd6d1ddb648c130ec84"
env:
DATAFUSION_EXECUTION_PARQUET_ENABLE_RLE_TO_DICTIONARY: "true"
resources:
cpu: "12"
memory: "65Gi"
arch: "arm64"Results will be posted here when complete File an issue against this benchmark runner |
|
🤖 Benchmark running (GKE) | trigger CPU Details (lscpu)Comparing c37a2aa (c37a2aa) to c37a2aa diff Run configurationrun benchmark tpch
env:
DATAFUSION_EXECUTION_PARQUET_SCHEMA_FORCE_VIEW_TYPES: "true"
DATAFUSION_OPTIMIZER_ENABLE_DICTIONARY_PRESERVATION: "false"
DATAFUSION_RUNTIME_MEMORY_LIMIT: "32G"
baseline:
ref: "c37a2aada6b21adc699c3fd6d1ddb648c130ec84"
env:
DATAFUSION_EXECUTION_PARQUET_ENABLE_RLE_TO_DICTIONARY: "false"
changed:
ref: "c37a2aada6b21adc699c3fd6d1ddb648c130ec84"
env:
DATAFUSION_EXECUTION_PARQUET_ENABLE_RLE_TO_DICTIONARY: "true"
resources:
cpu: "12"
memory: "65Gi"
arch: "arm64"Results will be posted here when complete File an issue against this benchmark runner |
|
🤖 Benchmark completed (GKE) | trigger Instance: Comparing c37a2aa (c37a2aa) to c37a2aa diff Run configurationrun benchmark tpch
env:
DATAFUSION_EXECUTION_PARQUET_SCHEMA_FORCE_VIEW_TYPES: "true"
DATAFUSION_OPTIMIZER_ENABLE_DICTIONARY_PRESERVATION: "false"
DATAFUSION_RUNTIME_MEMORY_LIMIT: "32G"
baseline:
ref: "c37a2aada6b21adc699c3fd6d1ddb648c130ec84"
env:
DATAFUSION_EXECUTION_PARQUET_ENABLE_RLE_TO_DICTIONARY: "false"
changed:
ref: "c37a2aada6b21adc699c3fd6d1ddb648c130ec84"
env:
DATAFUSION_EXECUTION_PARQUET_ENABLE_RLE_TO_DICTIONARY: "true"
resources:
cpu: "12"
memory: "65Gi"
arch: "arm64"CPU Details (lscpu)Details
Memory Pool PeaksPeak Base:
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.
Resource Usagetpch — base (merge-base)
tpch — branch
File an issue against this benchmark runner |
|
🤖 Benchmark completed (GKE) | trigger Instance: Comparing c37a2aa (c37a2aa) to c37a2aa diff Run configurationrun benchmark tpcds
env:
DATAFUSION_EXECUTION_PARQUET_SCHEMA_FORCE_VIEW_TYPES: "true"
DATAFUSION_OPTIMIZER_ENABLE_DICTIONARY_PRESERVATION: "false"
DATAFUSION_RUNTIME_MEMORY_LIMIT: "32G"
baseline:
ref: "c37a2aada6b21adc699c3fd6d1ddb648c130ec84"
env:
DATAFUSION_EXECUTION_PARQUET_ENABLE_RLE_TO_DICTIONARY: "false"
changed:
ref: "c37a2aada6b21adc699c3fd6d1ddb648c130ec84"
env:
DATAFUSION_EXECUTION_PARQUET_ENABLE_RLE_TO_DICTIONARY: "true"
resources:
cpu: "12"
memory: "65Gi"
arch: "arm64"CPU Details (lscpu)Details
Memory Pool PeaksPeak Base:
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.
Resource Usagetpcds — base (merge-base)
tpcds — branch
File an issue against this benchmark runner |
|
🤖 Benchmark completed (GKE) | trigger Instance: Comparing c37a2aa (c37a2aa) to c37a2aa diff Run configurationrun benchmark clickbench_partitioned
env:
DATAFUSION_EXECUTION_PARQUET_SCHEMA_FORCE_VIEW_TYPES: "true"
DATAFUSION_OPTIMIZER_ENABLE_DICTIONARY_PRESERVATION: "false"
DATAFUSION_RUNTIME_MEMORY_LIMIT: "32G"
baseline:
ref: "c37a2aada6b21adc699c3fd6d1ddb648c130ec84"
env:
DATAFUSION_EXECUTION_PARQUET_ENABLE_RLE_TO_DICTIONARY: "false"
changed:
ref: "c37a2aada6b21adc699c3fd6d1ddb648c130ec84"
env:
DATAFUSION_EXECUTION_PARQUET_ENABLE_RLE_TO_DICTIONARY: "true"
resources:
cpu: "12"
memory: "65Gi"
arch: "arm64"CPU Details (lscpu)Details
Memory Pool PeaksPeak Base:
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.
Resource Usageclickbench_partitioned — base (merge-base)
clickbench_partitioned — branch
File an issue against this benchmark runner |
c37a2aa to
39710ae
Compare
|
run benchmark tpch tpcds clickbench_partitioned env:
DATAFUSION_EXECUTION_PARQUET_ENABLE_RLE_TO_DICTIONARY: "false"
DATAFUSION_RUNTIME_MEMORY_LIMIT: "32G"
baseline:
ref: "c177f570461c872562da9a24830c67eb44d5f1be"
env:
DATAFUSION_OPTIMIZER_ENABLE_DICTIONARY_PRESERVATION: "false"
changed:
ref: "39710ae3c900317b674b126d3a9c9edd54e77f3c"
env:
DATAFUSION_OPTIMIZER_ENABLE_DICTIONARY_PRESERVATION: "true"
resources:
cpu: "12"
memory: "65Gi"
arch: arm64 |
|
🤖 Benchmark running (GKE) | trigger CPU Details (lscpu)Comparing 39710ae (39710ae) to c177f57 diff Run configurationrun benchmark tpch
env:
DATAFUSION_EXECUTION_PARQUET_ENABLE_RLE_TO_DICTIONARY: "false"
DATAFUSION_RUNTIME_MEMORY_LIMIT: "32G"
baseline:
ref: "c177f570461c872562da9a24830c67eb44d5f1be"
env:
DATAFUSION_OPTIMIZER_ENABLE_DICTIONARY_PRESERVATION: "false"
changed:
ref: "39710ae3c900317b674b126d3a9c9edd54e77f3c"
env:
DATAFUSION_OPTIMIZER_ENABLE_DICTIONARY_PRESERVATION: "true"
resources:
cpu: "12"
memory: "65Gi"
arch: "arm64"Results will be posted here when complete File an issue against this benchmark runner |
|
🤖 Benchmark running (GKE) | trigger CPU Details (lscpu)Comparing 39710ae (39710ae) to c177f57 diff Run configurationrun benchmark tpcds
env:
DATAFUSION_EXECUTION_PARQUET_ENABLE_RLE_TO_DICTIONARY: "false"
DATAFUSION_RUNTIME_MEMORY_LIMIT: "32G"
baseline:
ref: "c177f570461c872562da9a24830c67eb44d5f1be"
env:
DATAFUSION_OPTIMIZER_ENABLE_DICTIONARY_PRESERVATION: "false"
changed:
ref: "39710ae3c900317b674b126d3a9c9edd54e77f3c"
env:
DATAFUSION_OPTIMIZER_ENABLE_DICTIONARY_PRESERVATION: "true"
resources:
cpu: "12"
memory: "65Gi"
arch: "arm64"Results will be posted here when complete File an issue against this benchmark runner |
|
🤖 Benchmark running (GKE) | trigger CPU Details (lscpu)Comparing 39710ae (39710ae) to c177f57 diff Run configurationrun benchmark clickbench_partitioned
env:
DATAFUSION_EXECUTION_PARQUET_ENABLE_RLE_TO_DICTIONARY: "false"
DATAFUSION_RUNTIME_MEMORY_LIMIT: "32G"
baseline:
ref: "c177f570461c872562da9a24830c67eb44d5f1be"
env:
DATAFUSION_OPTIMIZER_ENABLE_DICTIONARY_PRESERVATION: "false"
changed:
ref: "39710ae3c900317b674b126d3a9c9edd54e77f3c"
env:
DATAFUSION_OPTIMIZER_ENABLE_DICTIONARY_PRESERVATION: "true"
resources:
cpu: "12"
memory: "65Gi"
arch: "arm64"Results will be posted here when complete File an issue against this benchmark runner |
|
🤖 Benchmark completed (GKE) | trigger Instance: Comparing 39710ae (39710ae) to c177f57 diff Run configurationrun benchmark tpch
env:
DATAFUSION_EXECUTION_PARQUET_ENABLE_RLE_TO_DICTIONARY: "false"
DATAFUSION_RUNTIME_MEMORY_LIMIT: "32G"
baseline:
ref: "c177f570461c872562da9a24830c67eb44d5f1be"
env:
DATAFUSION_OPTIMIZER_ENABLE_DICTIONARY_PRESERVATION: "false"
changed:
ref: "39710ae3c900317b674b126d3a9c9edd54e77f3c"
env:
DATAFUSION_OPTIMIZER_ENABLE_DICTIONARY_PRESERVATION: "true"
resources:
cpu: "12"
memory: "65Gi"
arch: "arm64"CPU Details (lscpu)Details
Memory Pool PeaksPeak Base:
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.
Resource Usagetpch — base (merge-base)
tpch — branch
File an issue against this benchmark runner |
|
🤖 Benchmark completed (GKE) | trigger Instance: Comparing 39710ae (39710ae) to c177f57 diff Run configurationrun benchmark tpcds
env:
DATAFUSION_EXECUTION_PARQUET_ENABLE_RLE_TO_DICTIONARY: "false"
DATAFUSION_RUNTIME_MEMORY_LIMIT: "32G"
baseline:
ref: "c177f570461c872562da9a24830c67eb44d5f1be"
env:
DATAFUSION_OPTIMIZER_ENABLE_DICTIONARY_PRESERVATION: "false"
changed:
ref: "39710ae3c900317b674b126d3a9c9edd54e77f3c"
env:
DATAFUSION_OPTIMIZER_ENABLE_DICTIONARY_PRESERVATION: "true"
resources:
cpu: "12"
memory: "65Gi"
arch: "arm64"CPU Details (lscpu)Details
Memory Pool PeaksPeak Base:
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.
Resource Usagetpcds — base (merge-base)
tpcds — branch
File an issue against this benchmark runner |
|
🤖 Benchmark completed (GKE) | trigger Instance: Comparing 39710ae (39710ae) to c177f57 diff Run configurationrun benchmark clickbench_partitioned
env:
DATAFUSION_EXECUTION_PARQUET_ENABLE_RLE_TO_DICTIONARY: "false"
DATAFUSION_RUNTIME_MEMORY_LIMIT: "32G"
baseline:
ref: "c177f570461c872562da9a24830c67eb44d5f1be"
env:
DATAFUSION_OPTIMIZER_ENABLE_DICTIONARY_PRESERVATION: "false"
changed:
ref: "39710ae3c900317b674b126d3a9c9edd54e77f3c"
env:
DATAFUSION_OPTIMIZER_ENABLE_DICTIONARY_PRESERVATION: "true"
resources:
cpu: "12"
memory: "65Gi"
arch: "arm64"CPU Details (lscpu)Details
Memory Pool PeaksPeak Base:
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.
Resource Usageclickbench_partitioned — base (merge-base)
clickbench_partitioned — branch
File an issue against this benchmark runner |
Part of #24117.
This adds a default-off physical optimizer rule that preserves profitable Parquet string dictionaries through aggregation:
Before:
After, when the cost and safety checks pass:
The rule fails closed. It requires Parquet footer metadata proving that every data page is dictionary encoded, native
Utf8dictionary values, at least 16 decoded value bytes per row, a decoded-to-Parquet byte ratio of at least 4:1, and at least 8 MiB of estimated string work at the aggregate. It traces group-key payloads through projections and safe inner equijoins, and skips filtered, limited, ranged, schema-overridden, or otherwise unsupported scan paths. SQL-visible schemas do not change.Physical encoding metadata is collected only while the option is enabled and cached with the normal file statistics. This draft temporarily pins Arrow to apache/arrow-rs#12161, which lets the Parquet reader emit the requested
Dictionary<Int32, Utf8>directly instead of repairing the value type with a per-batch cast.Benchmarks
Release build, Arrow PR head
eff59bb9, flag off vs on. Full TPC-H, TPC-DS, and partitioned ClickBench screens used alternatingABBA + BAABprocesses and discarded the first iteration in each process. Every apparent regression above 2% was rerun as an isolated query with longer alternating runs.No isolated regression remained above 2%:
Validation
Dictionary<Int32, Utf8>is returned directly with that type.avro,integration-tests,extended_tests, formatting, typos, catalog-listing tests, and focused Parquet/optimizer tests pass.