Skip to content

Add configurable UNION DISTINCT to FILTER rewrite optimization#21075

Open
xiedeyantu wants to merge 1 commit intoapache:mainfrom
xiedeyantu:union-filter
Open

Add configurable UNION DISTINCT to FILTER rewrite optimization#21075
xiedeyantu wants to merge 1 commit intoapache:mainfrom
xiedeyantu:union-filter

Conversation

@xiedeyantu
Copy link
Copy Markdown
Member

@xiedeyantu xiedeyantu commented Mar 20, 2026

  • Which issue does this PR close?

    Rationale for this change

    This PR adds a configurable optimizer rewrite for UNION DISTINCT queries. The goal is to allow the optimizer to collapse eligible union branches into a single filtered scan when the branches read from the same source and differ only by filter predicates.

    This optimization can reduce duplicated work and avoid scanning the same input multiple times. Keeping it behind a configuration flag makes the behavior explicit and safe to enable only when desired.

    What changes are included in this PR?

    • Adds a new optimizer configuration option: datafusion.optimizer.enable_unions_to_filter, which is disabled by default.
    • Enables the UnionsToFilter optimization rule in the logical optimizer pipeline.
    • Adds documentation for the new configuration option, including plan-shape examples.
    • Extends sqllogictest coverage in datafusion/sqllogictest/test_files/union.slt to cover both the disabled and enabled cases.
    • Verifies that the rewrite only applies to eligible UNION DISTINCT queries.

    Example rewrite

    When the rule is enabled, a query such as:

    SQL

    SELECT id, name FROM t1 WHERE id = 1
    UNION
    SELECT id, name FROM t1 WHERE id = 2
    

    may be rewritten into an equivalent plan that scans t1 once and applies a combined filter such as:

    SQL

    SELECT id, name FROM t1 WHERE id = 1 OR id = 2
    

    This keeps the results unchanged while avoiding repeated reads from the same source.

    Are these changes tested?

    Yes.

    The new behavior is covered by sqllogictest cases that validate both plan variants:

    • the original UNION DISTINCT execution path when the option is disabled
    • the rewritten single-scan plan when the option is enabled

    Are there any user-facing changes?

    Yes.

    A new configuration option is introduced:

    • datafusion.optimizer.enable_unions_to_filter

    When enabled, some UNION DISTINCT queries may be optimized into a different plan shape. Query results remain the same, but the execution plan may change.

@xiedeyantu xiedeyantu marked this pull request as draft March 20, 2026 10:24
@github-actions github-actions Bot added optimizer Optimizer rules sqllogictest SQL Logic Tests (.slt) common Related to common crate labels Mar 20, 2026
@xiedeyantu xiedeyantu changed the title Add configurable UNION DISTINCT to filter rewrite optimization Add configurable UNION DISTINCT to FILTER rewrite optimization Mar 20, 2026
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Mar 20, 2026
@xiedeyantu xiedeyantu marked this pull request as ready for review March 20, 2026 14:12
@xiedeyantu
Copy link
Copy Markdown
Member Author

Hi @alamb , here's another PR related to plan optimization. Do we need it? I'd also like to know what aspects of optimization we accept.

@xiedeyantu
Copy link
Copy Markdown
Member Author

Hi @Dandandan , I noticed that you’re very knowledgeable about SQL optimization. It would be great if you could help me review this!

@alamb
Copy link
Copy Markdown
Contributor

alamb commented Mar 22, 2026

@xiedeyantu -- can you please file a ticket explaining what usecase you are targeting with this optimization?

Your explanation in

Rationale for this change

Mostly focuses on "what" is changed, not the "why"

In terms of usecase I think what is important:

  1. Example SQL queries that show the pattern you are optimizing for

Then for this optimization it would be great to have some benchmark numbers showing that the query of interest iindeed gets faster with this optimization compared than without it


query TT
EXPLAIN SELECT id, name FROM t1 WHERE id = 1 UNION SELECT id, name FROM t1 WHERE id = 2
----
Copy link
Copy Markdown
Member Author

@xiedeyantu xiedeyantu Mar 22, 2026

Choose a reason for hiding this comment

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

@alamb Here is an example: There is a rule for eliminating UNION under specific conditions. It applies when the branches of the UNION come from the same table and only differ in their WHERE conditions. This rule allows us to avoid an extra table scan — we only need to perform a single combined conditional filter.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I haven't looked at the proposed implementation but the rewrite can surely help in case of repeated costly union branches (especially when coming from possibly complex data sources powered via TableProvider).

It seems also particularly relevant until #8777 gets addressed (broader scope, CTE materialization), as currently there is no other way to mutualize repeated reads AFAIK.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Thank you @asolimando , for connecting me to such a valuable discussion. I think the idea in #8777 is excellent, but it seems we might need to perform a union operation once more. It looks like a final conclusion hasn't been reached yet? However, this approach can support UNION ALL. It seems the two might complement each other?

@xiedeyantu
Copy link
Copy Markdown
Member Author

I tested the execution times, and in reality, the difference between the two was not significant. My understanding is that the multiple branches within a UNION operation can be processed in parallel; therefore, one would not expect to see a substantial reduction in overall execution time (and if a significant improvement were observed, it would likely indicate an issue elsewhere). Consequently, I had to rely on EXPLAIN ANALYZE to inspect the execution plan, thereby demonstrating that—prior to optimization—the data required two separate scans, whereas after optimization, only a single scan was necessary.

The test SQL script is as follows:

# test_data.csv
id,category,amount,created_at
1,A,10,2026-03-29 00:00:01
2,B,20,2026-03-29 00:00:02
3,C,30,2026-03-29 00:00:03
......
9999,D,99990,2026-03-29 02:46:39
10000,E,100000,2026-03-29 02:46:40

# create table
CREATE EXTERNAL TABLE t (
  id INT,
  category STRING,
  amount INT,
  created_at TIMESTAMP
)
STORED AS CSV
LOCATION 'test_data.csv'
OPTIONS (
  has_header 'true'
);

set datafusion.optimizer.enable_unions_to_filter=false;
EXPLAIN ANALYZE 
SELECT category FROM t WHERE id > 5
UNION
SELECT category FROM t WHERE id < 10;
+-------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| plan_type         | plan                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
+-------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Plan with Metrics | AggregateExec: mode=FinalPartitioned, gby=[category@0 as category], aggr=[], metrics=[output_rows=5, elapsed_compute=512.96µs, output_bytes=128.0 B, output_batches=2, spill_count=0, spilled_bytes=0.0 B, spilled_rows=0, peak_mem_used=3.49 K, aggregate_arguments_time=8ns, aggregation_time=8ns, emitting_time=5.51µs, time_calculating_group_ids=21.34µs]                                                                                                                                |
|                   |   RepartitionExec: partitioning=Hash([category@0], 8), input_partitions=16, metrics=[output_rows=15, elapsed_compute=129.16µs, output_bytes=256.0 KB, output_batches=2, spill_count=0, spilled_bytes=0.0 B, spilled_rows=0, fetch_time=311.11ms, repartition_time=52.80µs, send_time=27.66µs]                                                                                                                                                                                                 |
|                   |     AggregateExec: mode=Partial, gby=[category@0 as category], aggr=[], metrics=[output_rows=15, elapsed_compute=2.50ms, output_bytes=384.0 B, output_batches=3, spill_count=0, spilled_bytes=0.0 B, spilled_rows=0, skipped_aggregation_rows=0, peak_mem_used=167.2 K, aggregate_arguments_time=16ns, aggregation_time=16ns, emitting_time=16.47µs, time_calculating_group_ids=2.06ms, reduction_factor=0.15% (15/10.00 K)]                                                                  |
|                   |       UnionExec, metrics=[output_rows=10.00 K, elapsed_compute=298.29µs, output_bytes=383.9 KB, output_batches=3]                                                                                                                                                                                                                                                                                                                                                                             |
|                   |         FilterExec: id@0 > 5, projection=[category@1], metrics=[output_rows=9.99 K, elapsed_compute=418.21µs, output_bytes=255.9 KB, output_batches=2, selectivity=100% (9.99 K/10.00 K)]                                                                                                                                                                                                                                                                                                     |
|                   |           RepartitionExec: partitioning=RoundRobinBatch(8), input_partitions=1, metrics=[output_rows=10.00 K, elapsed_compute=35.17µs, output_bytes=320.0 KB, output_batches=2, spill_count=0, spilled_bytes=0.0 B, spilled_rows=0, fetch_time=19.31ms, repartition_time=1ns, send_time=16.59µs]                                                                                                                                                                                              |
|                   |             DataSourceExec: file_groups={1 group: [[Users/jensen/test/test_data.csv]]}, projection=[id, category], file_type=csv, has_header=true, metrics=[output_rows=10.00 K, elapsed_compute=18.83ms, output_bytes=196.2 KB, output_batches=2, batches_split=0, file_open_errors=0, file_scan_errors=0, files_opened=1, files_processed=1, time_elapsed_opening=359.75µs, time_elapsed_processing=19.09ms, time_elapsed_scanning_total=18.89ms, time_elapsed_scanning_until_data=15.39ms] |
|                   |         FilterExec: id@0 < 10, projection=[category@1], metrics=[output_rows=9, elapsed_compute=310.84µs, output_bytes=128.0 KB, output_batches=1, selectivity=0.09% (9/10.00 K)]                                                                                                                                                                                                                                                                                                             |
|                   |           RepartitionExec: partitioning=RoundRobinBatch(8), input_partitions=1, metrics=[output_rows=10.00 K, elapsed_compute=62.12µs, output_bytes=320.0 KB, output_batches=2, spill_count=0, spilled_bytes=0.0 B, spilled_rows=0, fetch_time=18.82ms, repartition_time=1ns, send_time=47.76µs]                                                                                                                                                                                              |
|                   |             DataSourceExec: file_groups={1 group: [[Users/jensen/test/test_data.csv]]}, projection=[id, category], file_type=csv, has_header=true, metrics=[output_rows=10.00 K, elapsed_compute=18.35ms, output_bytes=196.2 KB, output_batches=2, batches_split=0, file_open_errors=0, file_scan_errors=0, files_opened=1, files_processed=1, time_elapsed_opening=364.33µs, time_elapsed_processing=18.63ms, time_elapsed_scanning_total=18.48ms, time_elapsed_scanning_until_data=15.05ms] |
|                   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
+-------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row(s) fetched. 
Elapsed 0.038 seconds.

set datafusion.optimizer.enable_unions_to_filter=true;
EXPLAIN ANALYZE 
SELECT category FROM t WHERE id > 5
UNION
SELECT category FROM t WHERE id < 10;
+-------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| plan_type         | plan                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
+-------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Plan with Metrics | AggregateExec: mode=FinalPartitioned, gby=[category@0 as category], aggr=[], metrics=[output_rows=5, elapsed_compute=374.54µs, output_bytes=128.0 B, output_batches=2, spill_count=0, spilled_bytes=0.0 B, spilled_rows=0, peak_mem_used=3.36 K, aggregate_arguments_time=8ns, aggregation_time=8ns, emitting_time=5.50µs, time_calculating_group_ids=19.13µs]                                                                                                                              |
|                   |   RepartitionExec: partitioning=Hash([category@0], 8), input_partitions=8, metrics=[output_rows=10, elapsed_compute=97.63µs, output_bytes=256.0 KB, output_batches=2, spill_count=0, spilled_bytes=0.0 B, spilled_rows=0, fetch_time=180.39ms, repartition_time=48.84µs, send_time=30.44µs]                                                                                                                                                                                                 |
|                   |     AggregateExec: mode=Partial, gby=[category@0 as category], aggr=[], metrics=[output_rows=10, elapsed_compute=2.00ms, output_bytes=256.0 B, output_batches=2, spill_count=0, spilled_bytes=0.0 B, spilled_rows=0, skipped_aggregation_rows=0, peak_mem_used=164.5 K, aggregate_arguments_time=8ns, aggregation_time=8ns, emitting_time=14.63µs, time_calculating_group_ids=1.81ms, reduction_factor=0.1% (10/10.00 K)]                                                                   |
|                   |       FilterExec: id@0 > 5 OR id@0 < 10, projection=[category@1], metrics=[output_rows=10.00 K, elapsed_compute=526.17µs, output_bytes=256.0 KB, output_batches=2, selectivity=100% (10.00 K/10.00 K)]                                                                                                                                                                                                                                                                                      |
|                   |         RepartitionExec: partitioning=RoundRobinBatch(8), input_partitions=1, metrics=[output_rows=10.00 K, elapsed_compute=58.50µs, output_bytes=320.0 KB, output_batches=2, spill_count=0, spilled_bytes=0.0 B, spilled_rows=0, fetch_time=22.05ms, repartition_time=1ns, send_time=25.67µs]                                                                                                                                                                                              |
|                   |           DataSourceExec: file_groups={1 group: [[Users/jensen/test/test_data.csv]]}, projection=[id, category], file_type=csv, has_header=true, metrics=[output_rows=10.00 K, elapsed_compute=21.49ms, output_bytes=196.2 KB, output_batches=2, batches_split=0, file_open_errors=0, file_scan_errors=0, files_opened=1, files_processed=1, time_elapsed_opening=468.54µs, time_elapsed_processing=21.82ms, time_elapsed_scanning_total=21.57ms, time_elapsed_scanning_until_data=18.30ms] |
|                   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
+-------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row(s) fetched. 
Elapsed 0.040 seconds.

@xiedeyantu
Copy link
Copy Markdown
Member Author

@alamb I have refined the PR description and added a test scenario; could you please take a look and let me know if you find it valuable?

@xiedeyantu
Copy link
Copy Markdown
Member Author

@alamb If you have a moment, could you please take another look? Thank you!

@xiedeyantu
Copy link
Copy Markdown
Member Author

@comphead I'm not sure if you can help me review this PR?

@comphead
Copy link
Copy Markdown
Contributor

comphead commented Apr 2, 2026

I would agree with @alamb to create initial ticket stating the problem. PR description is nice but it is a solution whereas ticket is a problem statement and some people could also participate in problem discussion

@xiedeyantu
Copy link
Copy Markdown
Member Author

I would agree with @alamb to create initial ticket stating the problem. PR description is nice but it is a solution whereas ticket is a problem statement and some people could also participate in problem discussion

@comphead Apologies—I may not have fully understood the process earlier; I thought simply describing the issue within the PR itself (including both the problem and the proposed solution) would suffice. I have now created a new issue #21310 for everyone to discuss. Please take a look and let me know if it looks appropriate.

@comphead
Copy link
Copy Markdown
Contributor

comphead commented Apr 2, 2026

Thanks @xiedeyantu I'll take a look this week, would be super useful for users and also for regression to have internal microbenchmarks, similar to datafusion/core/benches/push_down_filter.rs

Comment thread datafusion/optimizer/src/unions_to_filter.rs
Comment thread datafusion/optimizer/src/unions_to_filter.rs Outdated
Comment thread datafusion/optimizer/src/unions_to_filter.rs Outdated
Copy link
Copy Markdown
Contributor

@comphead comphead left a comment

Choose a reason for hiding this comment

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

Thanks @xiedeyantu for this PR, I think we need to run current tests with this optimizer rule on. The easiest way to proceed if you enable the rule by default in this PR so we can run CI and also benchmarks to get some data points and then disable the rule

@xiedeyantu
Copy link
Copy Markdown
Member Author

Thanks @xiedeyantu for this PR, I think we need to run current tests with this optimizer rule on. The easiest way to proceed if you enable the rule by default in this PR so we can run CI and also benchmarks to get some data points and then disable the rule

@comphead Thank you for your detailed review. I will immediately address these issues based on your comments and temporarily set the parameter to true.

@xiedeyantu
Copy link
Copy Markdown
Member Author

xiedeyantu commented Apr 7, 2026

@comphead Could you tell me how to run benchmark? I have changed enable_unions_to_filter to default true.

@comphead
Copy link
Copy Markdown
Contributor

comphead commented Apr 7, 2026

run benchmark

@adriangbot
Copy link
Copy Markdown

Hi @comphead, run benchmark requires benchmark names (#21075 (comment)).

Supported benchmarks:

  • Standard: clickbench_1, clickbench_extended, clickbench_partitioned, clickbench_pushdown, external_aggr, smj, sort_pushdown, sort_pushdown_sorted, tpcds, tpch, tpch10, tpch_mem, tpch_mem10
  • Criterion: (any)

Usage:

run benchmark <name>           # run specific benchmark(s)
run benchmarks                 # run default suite
run benchmarks <name1> <name2> # run specific benchmarks

Per-side configuration (run benchmark tpch followed by):

env:
SHARED_SETTING: enabled
baseline:
ref: v45.0.0
env:
DATAFUSION_RUNTIME_MEMORY_LIMIT: 1G
changed:
ref: v46.0.0
env:
DATAFUSION_RUNTIME_MEMORY_LIMIT: 2G

File an issue against this benchmark runner

@comphead
Copy link
Copy Markdown
Contributor

comphead commented Apr 7, 2026

run benchmark tpch tpcds

@adriangbot
Copy link
Copy Markdown

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

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

Comparing union-filter (056e734) to 9885f4b (merge-base) diff using: tpcds
Results will be posted here when complete


File an issue against this benchmark runner

@xiedeyantu
Copy link
Copy Markdown
Member Author

@alamb Could you please help me rerun the benchmark?

@xiedeyantu
Copy link
Copy Markdown
Member Author

run benchmark tpcds

@adriangbot
Copy link
Copy Markdown

@haohuaijin
Copy link
Copy Markdown
Contributor

run benchmark tpcds

@adriangbot
Copy link
Copy Markdown

Benchmark for this request failed.

Last 20 lines of output:

Click to expand
 * [new tag]             48.0.0-rc1           -> 48.0.0-rc1
 * [new tag]             48.0.0-rc2           -> 48.0.0-rc2
 * [new tag]             5.0.0                -> 5.0.0
 * [new tag]             5.0.0-rc1            -> 5.0.0-rc1
 * [new tag]             5.0.0-rc3            -> 5.0.0-rc3
 * [new tag]             6.0.0                -> 6.0.0
 * [new tag]             6.0.0-rc0            -> 6.0.0-rc0
 * [new tag]             7.0.0                -> 7.0.0
 * [new tag]             7.0.0-rc2            -> 7.0.0-rc2
 * [new tag]             8.0.0                -> 8.0.0
 * [new tag]             8.0.0-rc1            -> 8.0.0-rc1
 * [new tag]             8.0.0-rc2            -> 8.0.0-rc2
 * [new tag]             9.0.0                -> 9.0.0
 * [new tag]             9.0.0-rc1            -> 9.0.0-rc1
 * [new tag]             ballista-0.5.0       -> ballista-0.5.0
 * [new tag]             ballista-0.6.0       -> ballista-0.6.0
 * [new tag]             ballista-0.7.0       -> ballista-0.7.0
 * [new tag]             python-0.3.0         -> python-0.3.0
 * [new tag]             python-0.4.0         -> python-0.4.0
Switched to branch 'union-filter'

File an issue against this benchmark runner

@xiedeyantu
Copy link
Copy Markdown
Member Author

Benchmark for this request failed.

Last 20 lines of output:

Click to expand
File an issue against this benchmark runner

@haohuaijin Thanks for rerunning the benchmark, I don't know why the benchmark can not be ran. Could you tell me the reason?

@haohuaijin
Copy link
Copy Markdown
Contributor

@haohuaijin Thanks for rerunning the benchmark, I don't know why the benchmark can not be ran. Could you tell me the reason?

i also do not know the reason...

@xiedeyantu
Copy link
Copy Markdown
Member Author

@haohuaijin Thanks for rerunning the benchmark, I don't know why the benchmark can not be ran. Could you tell me the reason?

i also do not know the reason...

Thanks all the same.

@xiedeyantu
Copy link
Copy Markdown
Member Author

Thanks @xiedeyantu for this PR, I think we need to run current tests with this optimizer rule on. The easiest way to proceed if you enable the rule by default in this PR so we can run CI and also benchmarks to get some data points and then disable the rule

@comphead I've already set the default value of the parameter to true, but I don't know why the benchmark won't run. Can you help me take a look?

@comphead
Copy link
Copy Markdown
Contributor

run benchmark tpcds tpch

@adriangbot
Copy link
Copy Markdown

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

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

Comparing union-filter (74692d9) to 29f1acd (merge-base) diff using: tpch
Results will be posted here when complete


File an issue against this benchmark runner

@adriangbot
Copy link
Copy Markdown

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

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

Comparing union-filter (74692d9) to 29f1acd (merge-base) diff using: tpcds
Results will be posted here when complete


File an issue against this benchmark runner

@adriangbot
Copy link
Copy Markdown

🤖 Benchmark completed (GKE) | trigger

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

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

Comparing HEAD and union-filter
--------------------
Benchmark tpcds_sf1.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Query     ┃                                     HEAD ┃                             union-filter ┃        Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ QQuery 1  │              7.09 / 7.49 ±0.64 / 8.76 ms │              6.80 / 7.17 ±0.68 / 8.53 ms │     no change │
│ QQuery 2  │        148.25 / 149.50 ±1.02 / 150.99 ms │        146.76 / 147.86 ±1.32 / 150.37 ms │     no change │
│ QQuery 3  │        115.49 / 115.73 ±0.18 / 116.05 ms │        114.96 / 115.49 ±0.59 / 116.61 ms │     no change │
│ QQuery 4  │    1422.08 / 1445.55 ±12.79 / 1459.77 ms │    1391.51 / 1413.76 ±12.77 / 1430.98 ms │     no change │
│ QQuery 5  │        175.00 / 176.66 ±1.57 / 179.03 ms │        174.53 / 175.51 ±0.59 / 176.23 ms │     no change │
│ QQuery 6  │       879.01 / 895.42 ±15.93 / 915.91 ms │       853.46 / 869.75 ±18.64 / 892.97 ms │     no change │
│ QQuery 7  │        350.04 / 355.64 ±4.33 / 362.40 ms │        351.07 / 351.82 ±0.75 / 353.18 ms │     no change │
│ QQuery 8  │        118.21 / 120.28 ±1.14 / 121.47 ms │        117.78 / 119.11 ±0.81 / 120.03 ms │     no change │
│ QQuery 9  │        103.44 / 106.13 ±2.14 / 107.93 ms │        100.92 / 106.54 ±2.90 / 109.22 ms │     no change │
│ QQuery 10 │        108.37 / 109.12 ±1.03 / 111.15 ms │        108.32 / 108.89 ±0.59 / 109.93 ms │     no change │
│ QQuery 11 │     1041.93 / 1051.97 ±5.69 / 1056.39 ms │     1041.31 / 1050.95 ±9.73 / 1067.97 ms │     no change │
│ QQuery 12 │           46.64 / 48.38 ±1.03 / 49.87 ms │           48.84 / 49.95 ±1.37 / 52.61 ms │     no change │
│ QQuery 13 │        413.11 / 418.35 ±3.24 / 422.37 ms │        411.94 / 418.32 ±4.53 / 424.63 ms │     no change │
│ QQuery 14 │     1025.35 / 1029.16 ±2.81 / 1033.37 ms │    1004.00 / 1024.94 ±12.91 / 1037.65 ms │     no change │
│ QQuery 15 │           16.87 / 17.49 ±0.37 / 17.99 ms │           16.11 / 17.99 ±2.12 / 21.70 ms │     no change │
│ QQuery 16 │             7.82 / 8.33 ±0.84 / 10.00 ms │              7.63 / 8.00 ±0.35 / 8.61 ms │     no change │
│ QQuery 17 │        235.89 / 238.10 ±2.04 / 240.95 ms │        236.25 / 237.37 ±1.04 / 239.02 ms │     no change │
│ QQuery 18 │        130.77 / 131.63 ±0.97 / 133.49 ms │        129.49 / 131.62 ±1.92 / 134.40 ms │     no change │
│ QQuery 19 │        161.07 / 162.46 ±1.42 / 164.97 ms │        160.29 / 161.79 ±0.89 / 163.07 ms │     no change │
│ QQuery 20 │           14.32 / 15.05 ±0.51 / 15.62 ms │           14.55 / 15.15 ±0.41 / 15.63 ms │     no change │
│ QQuery 21 │           20.55 / 21.15 ±0.41 / 21.74 ms │           20.02 / 20.50 ±0.27 / 20.81 ms │     no change │
│ QQuery 22 │        505.19 / 508.86 ±2.29 / 511.16 ms │        502.14 / 508.27 ±6.15 / 518.49 ms │     no change │
│ QQuery 23 │        928.53 / 939.34 ±7.18 / 949.17 ms │        926.14 / 934.79 ±6.72 / 944.58 ms │     no change │
│ QQuery 24 │        401.59 / 403.41 ±1.75 / 406.07 ms │        397.56 / 403.32 ±3.82 / 409.31 ms │     no change │
│ QQuery 25 │        354.91 / 356.22 ±0.75 / 356.94 ms │        354.12 / 356.13 ±1.30 / 357.91 ms │     no change │
│ QQuery 26 │           81.50 / 83.94 ±1.80 / 86.12 ms │           81.02 / 83.74 ±1.64 / 85.64 ms │     no change │
│ QQuery 27 │              7.18 / 7.55 ±0.39 / 8.29 ms │              7.50 / 8.01 ±0.80 / 9.60 ms │  1.06x slower │
│ QQuery 28 │        151.41 / 152.95 ±1.29 / 155.32 ms │        152.30 / 154.80 ±2.15 / 158.52 ms │     no change │
│ QQuery 29 │        290.15 / 294.30 ±2.46 / 297.75 ms │        290.83 / 293.78 ±2.44 / 297.77 ms │     no change │
│ QQuery 30 │           44.37 / 47.69 ±2.32 / 50.50 ms │           44.22 / 46.89 ±2.36 / 50.91 ms │     no change │
│ QQuery 31 │        170.69 / 174.61 ±2.17 / 177.20 ms │        176.29 / 178.16 ±1.13 / 179.45 ms │     no change │
│ QQuery 32 │           14.49 / 15.24 ±0.78 / 16.49 ms │           14.35 / 14.65 ±0.24 / 14.97 ms │     no change │
│ QQuery 33 │        142.00 / 145.11 ±1.89 / 147.61 ms │        145.08 / 147.00 ±2.33 / 151.07 ms │     no change │
│ QQuery 34 │              7.29 / 7.80 ±0.75 / 9.28 ms │              7.38 / 8.09 ±0.92 / 9.91 ms │     no change │
│ QQuery 35 │        110.23 / 111.40 ±0.75 / 112.09 ms │        112.98 / 114.17 ±1.11 / 115.97 ms │     no change │
│ QQuery 36 │              6.76 / 6.98 ±0.16 / 7.26 ms │              7.10 / 7.56 ±0.53 / 8.57 ms │  1.08x slower │
│ QQuery 37 │            9.39 / 10.07 ±0.74 / 11.36 ms │              8.89 / 9.39 ±0.36 / 9.82 ms │ +1.07x faster │
│ QQuery 38 │           85.68 / 89.72 ±2.57 / 92.95 ms │           86.86 / 91.60 ±4.01 / 96.53 ms │     no change │
│ QQuery 39 │        131.23 / 134.33 ±3.72 / 140.06 ms │        131.69 / 137.90 ±3.31 / 141.57 ms │     no change │
│ QQuery 40 │        112.80 / 118.94 ±4.01 / 123.49 ms │        112.40 / 120.21 ±7.36 / 133.95 ms │     no change │
│ QQuery 41 │           15.63 / 16.21 ±0.45 / 16.73 ms │           15.31 / 15.69 ±0.33 / 16.15 ms │     no change │
│ QQuery 42 │        110.74 / 111.85 ±1.25 / 114.19 ms │        111.01 / 112.57 ±1.19 / 114.10 ms │     no change │
│ QQuery 43 │              6.02 / 6.17 ±0.11 / 6.34 ms │              6.33 / 6.42 ±0.08 / 6.54 ms │     no change │
│ QQuery 44 │           12.25 / 12.59 ±0.39 / 13.10 ms │           12.43 / 12.62 ±0.24 / 13.10 ms │     no change │
│ QQuery 45 │           52.37 / 53.72 ±1.10 / 55.14 ms │           52.46 / 53.84 ±1.01 / 54.96 ms │     no change │
│ QQuery 46 │              8.67 / 8.93 ±0.29 / 9.37 ms │              8.96 / 9.29 ±0.35 / 9.96 ms │     no change │
│ QQuery 47 │        799.04 / 808.84 ±5.76 / 814.89 ms │        808.90 / 818.03 ±6.97 / 825.66 ms │     no change │
│ QQuery 48 │        298.16 / 301.51 ±2.77 / 305.27 ms │        295.81 / 299.79 ±3.30 / 304.48 ms │     no change │
│ QQuery 49 │        256.50 / 258.52 ±1.81 / 261.50 ms │        253.69 / 256.50 ±1.71 / 258.85 ms │     no change │
│ QQuery 50 │        238.75 / 241.21 ±1.38 / 242.85 ms │        237.99 / 242.69 ±3.19 / 246.07 ms │     no change │
│ QQuery 51 │        186.86 / 188.89 ±2.48 / 193.37 ms │        183.47 / 188.69 ±3.30 / 193.60 ms │     no change │
│ QQuery 52 │        109.33 / 111.47 ±1.37 / 113.61 ms │        109.80 / 112.04 ±1.83 / 114.10 ms │     no change │
│ QQuery 53 │        104.13 / 104.97 ±0.96 / 106.75 ms │        105.05 / 107.53 ±1.37 / 109.16 ms │     no change │
│ QQuery 54 │        149.14 / 151.20 ±1.53 / 153.60 ms │        150.41 / 153.37 ±2.08 / 156.19 ms │     no change │
│ QQuery 55 │        109.57 / 110.72 ±0.96 / 111.97 ms │        108.10 / 110.70 ±1.77 / 113.56 ms │     no change │
│ QQuery 56 │        145.26 / 146.79 ±1.89 / 150.43 ms │        144.98 / 146.86 ±1.62 / 149.70 ms │     no change │
│ QQuery 57 │        178.82 / 180.34 ±1.45 / 182.67 ms │        179.01 / 180.58 ±1.17 / 182.52 ms │     no change │
│ QQuery 58 │        277.66 / 280.04 ±2.39 / 284.12 ms │        277.82 / 279.07 ±0.98 / 280.18 ms │     no change │
│ QQuery 59 │        202.36 / 205.44 ±1.61 / 206.64 ms │        201.56 / 204.06 ±1.73 / 206.91 ms │     no change │
│ QQuery 60 │        148.33 / 149.01 ±0.91 / 150.79 ms │        147.32 / 148.05 ±0.80 / 149.47 ms │     no change │
│ QQuery 61 │           13.25 / 13.52 ±0.21 / 13.83 ms │           13.78 / 14.08 ±0.19 / 14.39 ms │     no change │
│ QQuery 62 │      924.21 / 973.59 ±50.74 / 1066.92 ms │      939.54 / 985.09 ±38.28 / 1028.32 ms │     no change │
│ QQuery 63 │        108.02 / 109.37 ±1.28 / 111.33 ms │        105.50 / 107.67 ±1.67 / 110.19 ms │     no change │
│ QQuery 64 │        712.45 / 718.64 ±5.20 / 727.89 ms │        710.21 / 717.57 ±4.78 / 724.04 ms │     no change │
│ QQuery 65 │        275.54 / 278.06 ±2.59 / 281.26 ms │        270.06 / 273.68 ±2.41 / 276.02 ms │     no change │
│ QQuery 66 │        260.83 / 265.49 ±3.30 / 270.65 ms │        253.18 / 261.61 ±5.69 / 270.87 ms │     no change │
│ QQuery 67 │        330.01 / 333.58 ±3.52 / 340.23 ms │        325.76 / 332.36 ±4.08 / 337.61 ms │     no change │
│ QQuery 68 │            8.89 / 10.08 ±1.25 / 12.08 ms │           10.15 / 11.89 ±2.03 / 15.45 ms │  1.18x slower │
│ QQuery 69 │        103.71 / 105.24 ±0.95 / 106.42 ms │        104.07 / 105.91 ±1.56 / 108.67 ms │     no change │
│ QQuery 70 │       344.45 / 358.31 ±11.88 / 375.77 ms │       349.75 / 357.67 ±10.26 / 377.33 ms │     no change │
│ QQuery 71 │        138.02 / 139.99 ±1.35 / 142.19 ms │        137.26 / 138.96 ±1.32 / 141.31 ms │     no change │
│ QQuery 72 │        632.38 / 646.07 ±8.17 / 655.09 ms │        633.09 / 644.60 ±8.40 / 653.48 ms │     no change │
│ QQuery 73 │             7.16 / 8.60 ±1.35 / 10.75 ms │              7.49 / 8.41 ±0.87 / 9.69 ms │     no change │
│ QQuery 74 │        653.24 / 661.77 ±5.99 / 671.00 ms │        650.32 / 654.88 ±4.19 / 661.96 ms │     no change │
│ QQuery 75 │        281.77 / 283.56 ±1.63 / 286.34 ms │        280.27 / 280.95 ±0.52 / 281.59 ms │     no change │
│ QQuery 76 │        136.46 / 137.48 ±1.07 / 139.54 ms │        133.86 / 135.30 ±1.43 / 137.66 ms │     no change │
│ QQuery 77 │        191.22 / 193.58 ±1.84 / 196.07 ms │        193.72 / 195.80 ±2.24 / 199.56 ms │     no change │
│ QQuery 78 │        359.26 / 360.52 ±1.58 / 363.55 ms │        350.17 / 355.70 ±4.51 / 363.77 ms │     no change │
│ QQuery 79 │        249.59 / 252.29 ±2.25 / 256.17 ms │        251.85 / 257.18 ±3.24 / 262.00 ms │     no change │
│ QQuery 80 │        330.36 / 332.80 ±2.96 / 338.54 ms │        332.45 / 334.74 ±2.15 / 338.54 ms │     no change │
│ QQuery 81 │           27.10 / 28.90 ±0.94 / 29.85 ms │           27.40 / 28.40 ±1.79 / 31.98 ms │     no change │
│ QQuery 82 │           41.31 / 42.58 ±1.31 / 44.94 ms │           41.96 / 43.17 ±1.07 / 45.03 ms │     no change │
│ QQuery 83 │           39.39 / 41.91 ±1.50 / 43.54 ms │           39.44 / 41.10 ±1.16 / 42.54 ms │     no change │
│ QQuery 84 │           49.31 / 50.24 ±0.64 / 51.07 ms │           50.27 / 50.44 ±0.14 / 50.57 ms │     no change │
│ QQuery 85 │        151.36 / 152.34 ±0.81 / 153.75 ms │        152.62 / 154.63 ±1.12 / 156.05 ms │     no change │
│ QQuery 86 │           39.58 / 41.35 ±1.08 / 42.54 ms │           40.30 / 41.25 ±0.83 / 42.31 ms │     no change │
│ QQuery 87 │           86.53 / 90.90 ±4.41 / 97.72 ms │           89.60 / 92.49 ±3.17 / 98.34 ms │     no change │
│ QQuery 88 │        102.07 / 103.54 ±1.27 / 105.19 ms │        103.21 / 104.17 ±0.92 / 105.49 ms │     no change │
│ QQuery 89 │        120.50 / 121.94 ±0.95 / 122.84 ms │        122.87 / 124.01 ±0.76 / 124.72 ms │     no change │
│ QQuery 90 │           24.11 / 24.64 ±0.49 / 25.39 ms │           25.10 / 26.23 ±1.05 / 27.62 ms │  1.06x slower │
│ QQuery 91 │           64.91 / 66.16 ±1.04 / 67.59 ms │           65.28 / 66.66 ±1.11 / 68.10 ms │     no change │
│ QQuery 92 │           58.42 / 59.44 ±0.89 / 60.74 ms │           59.89 / 60.48 ±0.46 / 61.09 ms │     no change │
│ QQuery 93 │        195.15 / 197.42 ±1.50 / 198.95 ms │        193.35 / 198.11 ±3.45 / 203.04 ms │     no change │
│ QQuery 94 │           62.51 / 63.65 ±1.08 / 65.23 ms │           63.57 / 64.18 ±0.49 / 64.75 ms │     no change │
│ QQuery 95 │        133.58 / 135.44 ±1.16 / 137.00 ms │        132.46 / 133.88 ±1.29 / 136.17 ms │     no change │
│ QQuery 96 │           73.69 / 75.07 ±1.37 / 77.69 ms │           72.68 / 75.39 ±1.52 / 77.33 ms │     no change │
│ QQuery 97 │        124.83 / 131.07 ±3.13 / 132.91 ms │        130.51 / 132.25 ±1.26 / 134.09 ms │     no change │
│ QQuery 98 │        156.83 / 160.29 ±2.62 / 164.17 ms │        158.61 / 160.61 ±1.54 / 162.60 ms │     no change │
│ QQuery 99 │ 10863.61 / 10902.17 ±39.08 / 10977.61 ms │ 10875.29 / 10908.47 ±22.80 / 10935.26 ms │     no change │
└───────────┴──────────────────────────────────────────┴──────────────────────────────────────────┴───────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Benchmark Summary           ┃            ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ Total Time (HEAD)           │ 32352.07ms │
│ Total Time (union-filter)   │ 32309.28ms │
│ Average Time (HEAD)         │   326.79ms │
│ Average Time (union-filter) │   326.36ms │
│ Queries Faster              │          1 │
│ Queries Slower              │          4 │
│ Queries with No Change      │         94 │
│ Queries with Failure        │          0 │
└─────────────────────────────┴────────────┘

Resource Usage

tpcds — base (merge-base)

Metric Value
Wall time 165.0s
Peak memory 5.2 GiB
Avg memory 4.3 GiB
CPU user 269.0s
CPU sys 17.4s
Peak spill 0 B

tpcds — branch

Metric Value
Wall time 165.0s
Peak memory 5.3 GiB
Avg memory 4.3 GiB
CPU user 268.0s
CPU sys 17.6s
Peak spill 0 B

File an issue against this benchmark runner

@xiedeyantu
Copy link
Copy Markdown
Member Author

xiedeyantu commented Apr 19, 2026

@comphead It seems some SQL queries were affected. Could you please run the process again to rule out environmental factors? Also, I’d like to confirm: is our goal to prevent all SQL queries from being marked as "slower"? If a few individual queries are flagged as "slower," would we consider merging them? Or, if no SQL is affected, do we still need the "false" parameter for control?

@comphead
Copy link
Copy Markdown
Contributor

run benchmark tpcds tpch

@comphead
Copy link
Copy Markdown
Contributor

@xiedeyantu just started the benches

bench results are prone to some kind of noise, so usually 1.0x in any direction is considered to be noise.
Looking at the results, they are pretty neutral, are you expecting this optimization to boost a query from TPC* set, like TPCDS Q3 or TPCH Q7 might look like a candidate?

@adriangbot
Copy link
Copy Markdown

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

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

Comparing union-filter (74692d9) to 29f1acd (merge-base) diff using: tpcds
Results will be posted here when complete


File an issue against this benchmark runner

@adriangbot
Copy link
Copy Markdown

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

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

Comparing union-filter (74692d9) to 29f1acd (merge-base) diff using: tpch
Results will be posted here when complete


File an issue against this benchmark runner

@adriangbot
Copy link
Copy Markdown

🤖 Benchmark completed (GKE) | trigger

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

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

Comparing HEAD and union-filter
--------------------
Benchmark tpcds_sf1.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Query     ┃                                     HEAD ┃                             union-filter ┃        Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ QQuery 1  │              6.56 / 6.95 ±0.77 / 8.49 ms │              6.52 / 6.94 ±0.70 / 8.32 ms │     no change │
│ QQuery 2  │        145.40 / 146.77 ±1.06 / 147.88 ms │        145.18 / 146.50 ±0.73 / 147.39 ms │     no change │
│ QQuery 3  │        114.20 / 114.67 ±0.56 / 115.69 ms │        113.27 / 113.87 ±0.43 / 114.39 ms │     no change │
│ QQuery 4  │    1296.32 / 1316.57 ±13.87 / 1330.89 ms │    1298.96 / 1329.49 ±24.34 / 1356.49 ms │     no change │
│ QQuery 5  │        171.40 / 174.83 ±2.88 / 179.78 ms │        172.03 / 173.55 ±1.07 / 175.27 ms │     no change │
│ QQuery 6  │       824.83 / 841.44 ±13.75 / 865.20 ms │        829.13 / 836.55 ±9.95 / 855.82 ms │     no change │
│ QQuery 7  │        341.21 / 343.85 ±2.48 / 348.58 ms │        342.48 / 344.20 ±1.23 / 345.49 ms │     no change │
│ QQuery 8  │        115.96 / 117.30 ±0.76 / 118.23 ms │        117.54 / 117.82 ±0.23 / 118.22 ms │     no change │
│ QQuery 9  │        100.94 / 103.71 ±2.25 / 107.02 ms │        105.58 / 109.71 ±4.47 / 116.07 ms │  1.06x slower │
│ QQuery 10 │        104.89 / 106.15 ±0.93 / 107.61 ms │        104.77 / 106.01 ±0.79 / 107.06 ms │     no change │
│ QQuery 11 │       913.64 / 935.19 ±18.58 / 961.63 ms │       902.33 / 930.61 ±15.34 / 943.90 ms │     no change │
│ QQuery 12 │           46.18 / 47.49 ±1.07 / 49.14 ms │           46.09 / 47.97 ±1.27 / 49.67 ms │     no change │
│ QQuery 13 │        400.35 / 405.10 ±3.31 / 409.55 ms │        403.88 / 406.11 ±2.63 / 410.87 ms │     no change │
│ QQuery 14 │     1010.76 / 1017.31 ±5.86 / 1025.79 ms │      996.81 / 1004.94 ±7.68 / 1018.91 ms │     no change │
│ QQuery 15 │           15.40 / 17.58 ±1.89 / 19.94 ms │           15.17 / 16.36 ±1.08 / 18.26 ms │ +1.07x faster │
│ QQuery 16 │              7.34 / 8.04 ±0.83 / 9.59 ms │              7.11 / 8.07 ±0.91 / 9.56 ms │     no change │
│ QQuery 17 │        227.14 / 231.55 ±2.77 / 235.62 ms │        225.81 / 229.20 ±1.96 / 231.21 ms │     no change │
│ QQuery 18 │        125.91 / 127.18 ±0.69 / 127.81 ms │        126.88 / 128.04 ±0.69 / 128.75 ms │     no change │
│ QQuery 19 │        154.45 / 156.89 ±1.53 / 158.66 ms │        155.40 / 157.16 ±1.32 / 159.40 ms │     no change │
│ QQuery 20 │           13.76 / 14.60 ±0.64 / 15.59 ms │           13.84 / 14.84 ±1.24 / 17.27 ms │     no change │
│ QQuery 21 │           19.31 / 19.81 ±0.50 / 20.76 ms │           19.11 / 19.47 ±0.27 / 19.87 ms │     no change │
│ QQuery 22 │        475.57 / 479.16 ±3.40 / 484.22 ms │        476.72 / 483.62 ±4.93 / 489.55 ms │     no change │
│ QQuery 23 │       862.82 / 873.78 ±13.96 / 900.33 ms │        874.15 / 881.46 ±4.83 / 887.71 ms │     no change │
│ QQuery 24 │        381.40 / 385.37 ±2.95 / 389.77 ms │        380.73 / 383.39 ±2.61 / 388.04 ms │     no change │
│ QQuery 25 │        339.57 / 341.59 ±1.19 / 343.21 ms │        341.24 / 343.61 ±1.81 / 346.03 ms │     no change │
│ QQuery 26 │           79.81 / 81.86 ±1.19 / 83.37 ms │           80.99 / 81.68 ±0.78 / 83.15 ms │     no change │
│ QQuery 27 │              6.80 / 7.33 ±0.50 / 8.22 ms │              6.81 / 7.35 ±0.62 / 8.54 ms │     no change │
│ QQuery 28 │       148.34 / 158.53 ±18.19 / 194.87 ms │        148.11 / 149.93 ±1.88 / 153.32 ms │ +1.06x faster │
│ QQuery 29 │        279.57 / 282.70 ±2.71 / 287.05 ms │        279.12 / 282.06 ±1.78 / 284.62 ms │     no change │
│ QQuery 30 │           43.99 / 45.27 ±1.27 / 47.16 ms │           43.37 / 44.88 ±1.89 / 48.54 ms │     no change │
│ QQuery 31 │        169.27 / 171.65 ±1.38 / 173.06 ms │        170.94 / 172.29 ±1.65 / 175.49 ms │     no change │
│ QQuery 32 │           13.87 / 14.98 ±1.12 / 16.71 ms │           13.66 / 14.29 ±0.74 / 15.69 ms │     no change │
│ QQuery 33 │        140.28 / 142.40 ±1.50 / 144.35 ms │        139.41 / 141.68 ±1.58 / 143.56 ms │     no change │
│ QQuery 34 │              6.82 / 7.10 ±0.31 / 7.66 ms │              6.79 / 7.08 ±0.29 / 7.64 ms │     no change │
│ QQuery 35 │        105.93 / 107.83 ±1.45 / 109.87 ms │        108.05 / 108.67 ±0.50 / 109.44 ms │     no change │
│ QQuery 36 │              6.55 / 6.67 ±0.15 / 6.96 ms │              6.34 / 6.68 ±0.20 / 6.93 ms │     no change │
│ QQuery 37 │              8.46 / 8.96 ±0.39 / 9.61 ms │              8.59 / 8.78 ±0.13 / 8.94 ms │     no change │
│ QQuery 38 │           83.79 / 86.84 ±3.85 / 94.42 ms │           83.02 / 86.21 ±2.76 / 90.47 ms │     no change │
│ QQuery 39 │        124.86 / 128.41 ±2.77 / 132.47 ms │        122.83 / 126.37 ±1.99 / 128.89 ms │     no change │
│ QQuery 40 │        109.31 / 116.50 ±5.67 / 126.14 ms │        107.56 / 113.78 ±9.78 / 133.29 ms │     no change │
│ QQuery 41 │           14.16 / 14.91 ±0.46 / 15.48 ms │           13.92 / 15.27 ±1.07 / 16.18 ms │     no change │
│ QQuery 42 │        109.84 / 110.15 ±0.24 / 110.56 ms │        108.34 / 110.12 ±1.55 / 112.69 ms │     no change │
│ QQuery 43 │              5.84 / 6.04 ±0.21 / 6.45 ms │              5.68 / 5.92 ±0.22 / 6.33 ms │     no change │
│ QQuery 44 │           11.54 / 11.75 ±0.18 / 12.01 ms │           11.59 / 11.77 ±0.13 / 11.90 ms │     no change │
│ QQuery 45 │           51.65 / 52.41 ±0.50 / 53.15 ms │           50.91 / 51.63 ±0.86 / 52.96 ms │     no change │
│ QQuery 46 │              8.45 / 8.66 ±0.21 / 8.92 ms │              8.42 / 8.69 ±0.25 / 9.13 ms │     no change │
│ QQuery 47 │        710.75 / 722.46 ±8.47 / 736.50 ms │        693.27 / 710.20 ±9.22 / 719.37 ms │     no change │
│ QQuery 48 │        287.89 / 293.49 ±4.12 / 298.34 ms │        285.08 / 290.02 ±4.14 / 297.61 ms │     no change │
│ QQuery 49 │        249.65 / 253.90 ±3.19 / 259.39 ms │        249.32 / 253.98 ±2.99 / 258.69 ms │     no change │
│ QQuery 50 │        225.37 / 228.84 ±2.55 / 231.77 ms │        218.60 / 227.28 ±5.15 / 234.02 ms │     no change │
│ QQuery 51 │        180.34 / 182.55 ±1.89 / 186.02 ms │        179.58 / 181.97 ±2.01 / 184.56 ms │     no change │
│ QQuery 52 │        106.38 / 108.36 ±1.58 / 110.36 ms │        107.79 / 109.51 ±1.60 / 111.92 ms │     no change │
│ QQuery 53 │        102.32 / 102.93 ±0.45 / 103.64 ms │        103.09 / 104.57 ±1.42 / 107.20 ms │     no change │
│ QQuery 54 │        144.48 / 146.89 ±2.04 / 149.81 ms │        147.13 / 148.24 ±1.08 / 150.26 ms │     no change │
│ QQuery 55 │        107.29 / 109.60 ±1.95 / 112.74 ms │        106.90 / 108.26 ±1.04 / 109.46 ms │     no change │
│ QQuery 56 │        140.18 / 142.60 ±1.64 / 145.14 ms │        139.86 / 141.96 ±1.64 / 144.01 ms │     no change │
│ QQuery 57 │        171.61 / 173.24 ±1.39 / 175.17 ms │        173.14 / 175.63 ±2.19 / 179.50 ms │     no change │
│ QQuery 58 │        270.35 / 273.77 ±1.79 / 275.38 ms │        268.59 / 272.63 ±2.17 / 274.95 ms │     no change │
│ QQuery 59 │        196.19 / 197.61 ±1.40 / 199.88 ms │        197.04 / 199.02 ±1.08 / 199.93 ms │     no change │
│ QQuery 60 │        142.52 / 144.69 ±1.51 / 146.47 ms │        142.00 / 144.13 ±1.60 / 146.31 ms │     no change │
│ QQuery 61 │           13.04 / 13.44 ±0.23 / 13.68 ms │           12.82 / 13.25 ±0.28 / 13.56 ms │     no change │
│ QQuery 62 │       907.96 / 947.19 ±25.22 / 983.27 ms │      886.46 / 955.14 ±53.47 / 1039.22 ms │     no change │
│ QQuery 63 │        103.31 / 105.84 ±1.91 / 108.51 ms │        104.33 / 105.88 ±1.90 / 109.60 ms │     no change │
│ QQuery 64 │        678.18 / 680.29 ±1.82 / 683.36 ms │        674.42 / 681.19 ±4.31 / 687.34 ms │     no change │
│ QQuery 65 │        248.70 / 252.58 ±3.45 / 258.70 ms │        246.32 / 251.12 ±2.49 / 253.12 ms │     no change │
│ QQuery 66 │       237.57 / 251.77 ±10.75 / 266.03 ms │       242.03 / 254.49 ±12.68 / 274.31 ms │     no change │
│ QQuery 67 │        311.14 / 320.06 ±7.57 / 330.28 ms │        308.40 / 317.95 ±7.66 / 330.33 ms │     no change │
│ QQuery 68 │             8.81 / 9.94 ±0.78 / 11.05 ms │            8.55 / 10.55 ±1.91 / 13.27 ms │  1.06x slower │
│ QQuery 69 │        101.21 / 103.92 ±2.62 / 107.78 ms │        100.28 / 102.07 ±1.06 / 103.49 ms │     no change │
│ QQuery 70 │        339.12 / 348.12 ±7.52 / 362.03 ms │       328.95 / 350.03 ±16.53 / 377.07 ms │     no change │
│ QQuery 71 │        134.83 / 137.16 ±2.69 / 142.21 ms │        137.07 / 140.75 ±2.24 / 143.70 ms │     no change │
│ QQuery 72 │        613.64 / 622.48 ±7.85 / 634.41 ms │       614.71 / 631.15 ±11.56 / 650.35 ms │     no change │
│ QQuery 73 │              6.47 / 7.42 ±1.08 / 9.46 ms │              6.71 / 7.88 ±0.95 / 9.01 ms │  1.06x slower │
│ QQuery 74 │        563.88 / 573.84 ±8.03 / 584.07 ms │       576.76 / 590.59 ±10.96 / 608.59 ms │     no change │
│ QQuery 75 │        274.08 / 275.48 ±1.97 / 279.28 ms │        274.37 / 276.95 ±1.86 / 280.07 ms │     no change │
│ QQuery 76 │        129.67 / 133.50 ±1.95 / 134.90 ms │        132.95 / 134.93 ±1.36 / 137.12 ms │     no change │
│ QQuery 77 │        187.75 / 190.71 ±2.26 / 194.24 ms │        187.89 / 189.39 ±1.52 / 192.25 ms │     no change │
│ QQuery 78 │        338.26 / 342.21 ±3.63 / 348.02 ms │        344.17 / 346.97 ±2.02 / 350.46 ms │     no change │
│ QQuery 79 │        229.04 / 232.58 ±2.22 / 235.49 ms │        231.33 / 232.42 ±0.72 / 233.33 ms │     no change │
│ QQuery 80 │        322.59 / 327.22 ±3.14 / 330.56 ms │        324.74 / 327.60 ±2.31 / 330.48 ms │     no change │
│ QQuery 81 │           26.16 / 27.02 ±0.71 / 27.86 ms │           25.74 / 26.47 ±0.63 / 27.64 ms │     no change │
│ QQuery 82 │           40.01 / 40.88 ±0.76 / 42.25 ms │           40.76 / 42.56 ±1.91 / 45.81 ms │     no change │
│ QQuery 83 │           37.93 / 39.82 ±1.39 / 41.65 ms │           38.84 / 39.96 ±1.05 / 41.32 ms │     no change │
│ QQuery 84 │           48.64 / 49.35 ±0.49 / 50.05 ms │           48.49 / 49.84 ±1.08 / 51.29 ms │     no change │
│ QQuery 85 │        146.28 / 147.49 ±0.78 / 148.60 ms │        149.52 / 150.08 ±0.94 / 151.95 ms │     no change │
│ QQuery 86 │           39.14 / 40.03 ±0.60 / 40.99 ms │           39.15 / 40.21 ±0.66 / 41.19 ms │     no change │
│ QQuery 87 │           82.78 / 87.56 ±4.34 / 93.15 ms │           81.55 / 86.04 ±3.47 / 92.20 ms │     no change │
│ QQuery 88 │         99.06 / 100.13 ±0.87 / 101.48 ms │         98.51 / 100.12 ±1.02 / 101.48 ms │     no change │
│ QQuery 89 │        117.35 / 119.32 ±1.37 / 121.56 ms │        118.90 / 119.33 ±0.36 / 119.96 ms │     no change │
│ QQuery 90 │           22.71 / 24.40 ±1.91 / 28.13 ms │           23.39 / 23.95 ±0.41 / 24.48 ms │     no change │
│ QQuery 91 │           62.48 / 64.70 ±1.61 / 66.26 ms │           62.77 / 65.31 ±1.66 / 68.01 ms │     no change │
│ QQuery 92 │           58.36 / 58.89 ±0.67 / 60.16 ms │           57.60 / 58.23 ±0.51 / 58.83 ms │     no change │
│ QQuery 93 │        188.08 / 188.75 ±1.15 / 191.05 ms │        189.24 / 190.47 ±0.87 / 191.58 ms │     no change │
│ QQuery 94 │           62.54 / 63.93 ±0.83 / 65.04 ms │           62.39 / 62.85 ±0.34 / 63.30 ms │     no change │
│ QQuery 95 │        127.61 / 129.78 ±1.65 / 132.61 ms │        129.27 / 131.24 ±1.70 / 133.42 ms │     no change │
│ QQuery 96 │           70.91 / 73.35 ±1.74 / 75.36 ms │           71.65 / 73.39 ±1.04 / 74.73 ms │     no change │
│ QQuery 97 │        126.60 / 127.67 ±0.59 / 128.39 ms │        125.89 / 128.33 ±1.51 / 129.92 ms │     no change │
│ QQuery 98 │        152.62 / 154.82 ±1.67 / 157.59 ms │        154.71 / 155.49 ±0.59 / 156.38 ms │     no change │
│ QQuery 99 │ 10754.55 / 10804.44 ±47.70 / 10878.84 ms │ 10728.55 / 10774.67 ±33.74 / 10819.06 ms │     no change │
└───────────┴──────────────────────────────────────────┴──────────────────────────────────────────┴───────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Benchmark Summary           ┃            ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ Total Time (HEAD)           │ 31202.85ms │
│ Total Time (union-filter)   │ 31200.87ms │
│ Average Time (HEAD)         │   315.18ms │
│ Average Time (union-filter) │   315.16ms │
│ Queries Faster              │          2 │
│ Queries Slower              │          3 │
│ Queries with No Change      │         94 │
│ Queries with Failure        │          0 │
└─────────────────────────────┴────────────┘

Resource Usage

tpcds — base (merge-base)

Metric Value
Wall time 160.0s
Peak memory 6.6 GiB
Avg memory 5.4 GiB
CPU user 257.9s
CPU sys 16.9s
Peak spill 0 B

tpcds — branch

Metric Value
Wall time 160.0s
Peak memory 6.1 GiB
Avg memory 5.3 GiB
CPU user 257.9s
CPU sys 17.0s
Peak spill 0 B

File an issue against this benchmark runner

@adriangbot
Copy link
Copy Markdown

Benchmark for this request hit the 7200s job deadline before finishing.

Benchmarks requested: tpch

Kubernetes message
Job was active longer than specified deadline

File an issue against this benchmark runner

@xiedeyantu
Copy link
Copy Markdown
Member Author

@xiedeyantu just started the benches

bench results are prone to some kind of noise, so usually 1.0x in any direction is considered to be noise. Looking at the results, they are pretty neutral, are you expecting this optimization to boost a query from TPC* set, like TPCDS Q3 or TPCH Q7 might look like a candidate?

I think neither TPC-DS nor TPC-H may have SQL queries suitable for this specific rule. As long as the rule doesn't slow down the query planning of other SQL in the tests, that should be acceptable.

@comphead
Copy link
Copy Markdown
Contributor

Agree, it is good there are no performance regressions. Let me go through it one final time.

Another thing: let's have the rule disabled by default to avoid optimization false positives, and potential user query degradation. We would need to add description of this change to Upgrade guide for DataFusion 54.0.0 release. So the users would know what is this rule, how it works, and for what type of queries it is reasonable to enable the rule config.

Generally speaking, going forward we need to document optimization rules and technics in a separate doc, so the users are able to check all optimization rules DataFusion is capable of and also how and when to use/enable/disable rules

@xiedeyantu
Copy link
Copy Markdown
Member Author

Agree, it is good there are no performance regressions. Let me go through it one final time.

Another thing: let's have the rule disabled by default to avoid optimization false positives, and potential user query degradation. We would need to add description of this change to Upgrade guide for DataFusion 54.0.0 release. So the users would know what is this rule, how it works, and for what type of queries it is reasonable to enable the rule config.

Generally speaking, going forward we need to document optimization rules and technics in a separate doc, so the users are able to check all optimization rules DataFusion is capable of and also how and when to use/enable/disable rules

@comphead Thank you for the guidance. Could you let me know a specific location where I can mimic the previous style to add the upgrade documentation you mentioned, and then change the configuration parameters to false.

@comphead
Copy link
Copy Markdown
Contributor

@comphead Thank you for the guidance. Could you let me know a specific location where I can mimic the previous style to add the upgrade documentation you mentioned, and then change the configuration parameters to false.

Please refer to docs/source/library-user-guide/upgrading/54.0.0.md

@xiedeyantu
Copy link
Copy Markdown
Member Author

The security_audit failed appears unrelated to my PR; the main branch has the same issue.

@github-actions github-actions Bot removed the substrait Changes to the substrait crate label Apr 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

common Related to common crate documentation Improvements or additions to documentation optimizer Optimizer rules performance Make DataFusion faster sqllogictest SQL Logic Tests (.slt)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add configurable UNION DISTINCT support to FILTER rewrite optimization

6 participants