Open andygrove opened 2 months ago
The FilterExec
in the above example is even more expensive than the HashJoinExec
. Evaluating the predicate is cheap but copying data to the filtered batch takes 99% of the time. We could potentially avoid this copy by using a selection vector approach instead.
Time to compute filter mask on batch of 32768 rows is: 581ns
Time to filter batch is: 252.194µs
The filter on the probe input is very simple (col_0@0 IS NOT NULL
) and it should be possible to push down to the parquet scan?
edit: we do push the filter down to the scan:
+- CometFilter [ss_sold_date_sk#1545, ss_sold_time_sk#1546, ss_quantity#1555], isnotnull(ss_sold_date_sk#1545)
+- CometScan parquet ... PushedFilters: [IsNotNull(ss_sold_date_sk)], ...
The FilterExec
does receive batches where ss_sold_date_sk
is null though:
predicate: length=8192, true=7843, false=349
predicate: length=8192, true=7832, false=360
predicate: length=8192, true=7846, false=346
Latest results after merging https://github.com/apache/datafusion-comet/pull/835
AMD Ryzen 9 7950X3D 16-Core Processor
TPCDS Micro Benchmarks: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative
------------------------------------------------------------------------------------------------------------------------
join_inner 98 110 8 293.4 3.4 1.0X
join_inner: Comet (Scan) 125 137 11 231.2 4.3 0.8X
join_inner: Comet (Scan, Exec) 151 164 12 190.9 5.2 0.7X
OpenJDK 64-Bit Server VM 11.0.24+8-post-Ubuntu-1ubuntu322.04 on Linux 6.5.0-45-generic
AMD Ryzen 9 7950X3D 16-Core Processor
TPCDS Micro Benchmarks: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative
------------------------------------------------------------------------------------------------------------------------
join_inner 516 535 23 558.4 1.8 1.0X
join_inner: Comet (Scan) 747 767 10 385.8 2.6 0.7X
join_inner: Comet (Scan, Exec) 990 1018 17 291.1 3.4 0.5X
What is the problem the feature request solves?
Query:
Benchmark results:
Native metrics (for one task).
Describe the potential solution
No response
Additional context
No response