wirybeaver opened a new pull request, #2981:
URL: https://github.com/apache/datafusion-ballista/pull/2981

   ## Motivation
   
   Task 3.2 of apache/datafusion-ballista#2700 lets Parquet skip row groups 
when a small build produces sparse join keys. For example, keys 2 and 98 can 
rule out a row group covering 30 through 40, even though it falls inside the 
build's MinMax range.
   
   ## Modification
   
   Keep up to 128 distinct typed keys alongside the existing runtime filter 
hashes. When a complete set is available at probe dispatch, push it into an 
eligible Parquet scan. Preserve NULL candidates for NULL-safe joins.
   
   ```text
   build keys → merged exact set → Parquet IN predicate → row-group pruning
   ```
   
   For larger build sets, send the merged join Bloom as a physical predicate to 
the Parquet reader. The reader evaluates eligible IN predicates, ordinary scan 
predicates, then join Blooms before materializing the remaining columns. CSV 
and other scans that cannot take over row filtering keep the bound Apply.
   
   ## User-facing behavior
   
   The existing runtime-filter option enables this optimization. When Parquet 
applies the predicate to rows, the scheduler removes the redundant Apply 
operator.
   
   ## Test
   
   The standalone join test disables DataFusion’s local join dynamic filter, 
verifies that the Parquet IN predicate prunes row groups, and compares results 
with distributed runtime filtering disabled. A second test verifies that an 
ordinary predicate followed by a join Bloom reduces the Parquet reader output 
from 2,731 candidates to fewer than 160 rows and preserves the query result.
   
   ## Benchmark Result
   
   TPC-DS SF10 on the five queries highlighted in [Andy’s SF100 
run](https://github.com/apache/datafusion-ballista/pull/2749#issuecomment-7050436802).
 A and B use the PR base with runtime filtering off and on, respectively. C 
uses the PR head with runtime filtering on. Positive changes indicate higher 
latency.
   
   | TPC-DS SF10 query | P90 latency · A / B / C (ms) | A → B | B → C | A → C |
   |---|---:|---:|---:|---:|
   | Q37 | 285.7 / 384.7 / 235.7 | +34.65% | **-38.73%** | -17.50% |
   | Q82 | 385.0 / 538.6 / 397.0 | +39.90% | **-26.29%** | +3.12% |
   | Q13 | 426.4 / 441.8 / 369.5 | +3.60% | **-16.36%** | -13.35% |
   | Q51 | 972.0 / 999.4 / 996.0 | +2.82% | **-0.34%** | +2.47% |
   | Q49 | 503.5 / 580.5 / 475.6 | +15.29% | **-18.06%** | -5.54% |
   
   P90 uses linear interpolation across the 12 timed visits per query and arm. 
All three arms matched DataFusion on all five queries.
   
   With filtering enabled, Q37, Q82, Q13 and Q49 improved in all 12 paired 
rounds. Q37 and Q82 pushed 5 and 18 item keys into the inventory scan. At P90, 
Q82 remained 3.12% slower than filtering off. Q51 was within 0.34% of the base 
with filtering enabled and remained 2.47% slower than filtering off.
   
   One Mac, release-nonlto builds, two executors per cluster (4 vcores and 4 
GiB each), 16 partitions and batch size 8192. After a correctness check and one 
suite warmup per arm, each round visited Q37, Q82, Q13, Q51 and Q49. Arm order 
cycled through ABC, ACB, BAC, BCA, CAB and CBA twice. Clusters stayed up 
between visits. Each visit ran one short warmup and one timed execution through 
result collection. All 180 timed visits completed.
   
   <details>
   <summary>Per-visit results</summary>
   
   | Round | Query | Visit | Latency (ms) |
   |---:|---|---|---:|
   | 1 | Q37 | A | 263.07 |
   | 1 | Q37 | B | 364.82 |
   | 1 | Q37 | C | 219.71 |
   | 1 | Q82 | A | 363.76 |
   | 1 | Q82 | B | 529.30 |
   | 1 | Q82 | C | 385.23 |
   | 1 | Q13 | A | 426.91 |
   | 1 | Q13 | B | 437.80 |
   | 1 | Q13 | C | 352.53 |
   | 1 | Q51 | A | 925.42 |
   | 1 | Q51 | B | 946.18 |
   | 1 | Q51 | C | 965.66 |
   | 1 | Q49 | A | 480.12 |
   | 1 | Q49 | B | 519.77 |
   | 1 | Q49 | C | 501.86 |
   | 2 | Q37 | A | 275.79 |
   | 2 | Q37 | C | 226.65 |
   | 2 | Q37 | B | 365.22 |
   | 2 | Q82 | A | 376.18 |
   | 2 | Q82 | C | 374.33 |
   | 2 | Q82 | B | 535.67 |
   | 2 | Q13 | A | 408.84 |
   | 2 | Q13 | C | 359.17 |
   | 2 | Q13 | B | 431.59 |
   | 2 | Q51 | A | 959.68 |
   | 2 | Q51 | C | 976.59 |
   | 2 | Q51 | B | 1001.14 |
   | 2 | Q49 | A | 486.48 |
   | 2 | Q49 | C | 453.92 |
   | 2 | Q49 | B | 569.39 |
   | 3 | Q37 | B | 389.42 |
   | 3 | Q37 | A | 273.26 |
   | 3 | Q37 | C | 226.48 |
   | 3 | Q82 | B | 531.02 |
   | 3 | Q82 | A | 377.79 |
   | 3 | Q82 | C | 376.44 |
   | 3 | Q13 | B | 433.39 |
   | 3 | Q13 | A | 413.45 |
   | 3 | Q13 | C | 356.39 |
   | 3 | Q51 | B | 984.02 |
   | 3 | Q51 | A | 940.61 |
   | 3 | Q51 | C | 996.58 |
   | 3 | Q49 | B | 535.56 |
   | 3 | Q49 | A | 498.96 |
   | 3 | Q49 | C | 466.89 |
   | 4 | Q37 | B | 374.10 |
   | 4 | Q37 | C | 224.92 |
   | 4 | Q37 | A | 268.50 |
   | 4 | Q82 | B | 538.75 |
   | 4 | Q82 | C | 382.22 |
   | 4 | Q82 | A | 372.31 |
   | 4 | Q13 | B | 441.88 |
   | 4 | Q13 | C | 369.51 |
   | 4 | Q13 | A | 416.53 |
   | 4 | Q51 | B | 979.31 |
   | 4 | Q51 | C | 972.14 |
   | 4 | Q51 | A | 929.82 |
   | 4 | Q49 | B | 512.72 |
   | 4 | Q49 | C | 448.26 |
   | 4 | Q49 | A | 481.69 |
   | 5 | Q37 | C | 232.69 |
   | 5 | Q37 | A | 274.14 |
   | 5 | Q37 | B | 384.83 |
   | 5 | Q82 | C | 391.42 |
   | 5 | Q82 | A | 370.77 |
   | 5 | Q82 | B | 530.97 |
   | 5 | Q13 | C | 363.10 |
   | 5 | Q13 | A | 410.92 |
   | 5 | Q13 | B | 436.79 |
   | 5 | Q51 | C | 967.94 |
   | 5 | Q51 | A | 950.44 |
   | 5 | Q51 | B | 959.55 |
   | 5 | Q49 | C | 463.13 |
   | 5 | Q49 | A | 504.00 |
   | 5 | Q49 | B | 541.91 |
   | 6 | Q37 | C | 224.19 |
   | 6 | Q37 | B | 383.25 |
   | 6 | Q37 | A | 272.63 |
   | 6 | Q82 | C | 370.50 |
   | 6 | Q82 | B | 536.86 |
   | 6 | Q82 | A | 365.97 |
   | 6 | Q13 | C | 359.94 |
   | 6 | Q13 | B | 434.27 |
   | 6 | Q13 | A | 421.15 |
   | 6 | Q51 | C | 990.81 |
   | 6 | Q51 | B | 958.08 |
   | 6 | Q51 | A | 949.50 |
   | 6 | Q49 | C | 465.67 |
   | 6 | Q49 | B | 558.25 |
   | 6 | Q49 | A | 493.66 |
   | 7 | Q37 | A | 272.19 |
   | 7 | Q37 | B | 374.68 |
   | 7 | Q37 | C | 223.57 |
   | 7 | Q82 | A | 385.76 |
   | 7 | Q82 | B | 415.47 |
   | 7 | Q82 | C | 391.34 |
   | 7 | Q13 | A | 513.07 |
   | 7 | Q13 | B | 471.81 |
   | 7 | Q13 | C | 369.10 |
   | 7 | Q51 | A | 973.15 |
   | 7 | Q51 | B | 1034.87 |
   | 7 | Q51 | C | 969.78 |
   | 7 | Q49 | A | 498.38 |
   | 7 | Q49 | B | 530.98 |
   | 7 | Q49 | C | 476.60 |
   | 8 | Q37 | A | 286.68 |
   | 8 | Q37 | C | 261.55 |
   | 8 | Q37 | B | 364.90 |
   | 8 | Q82 | A | 388.42 |
   | 8 | Q82 | C | 397.59 |
   | 8 | Q82 | B | 531.64 |
   | 8 | Q13 | A | 420.24 |
   | 8 | Q13 | C | 369.73 |
   | 8 | Q13 | B | 436.64 |
   | 8 | Q51 | A | 929.10 |
   | 8 | Q51 | C | 1045.63 |
   | 8 | Q51 | B | 939.13 |
   | 8 | Q49 | A | 482.85 |
   | 8 | Q49 | C | 446.60 |
   | 8 | Q49 | B | 581.70 |
   | 9 | Q37 | B | 370.66 |
   | 9 | Q37 | A | 340.99 |
   | 9 | Q37 | C | 236.03 |
   | 9 | Q82 | B | 523.95 |
   | 9 | Q82 | A | 365.36 |
   | 9 | Q82 | C | 378.81 |
   | 9 | Q13 | B | 440.63 |
   | 9 | Q13 | A | 421.93 |
   | 9 | Q13 | C | 353.62 |
   | 9 | Q51 | B | 970.92 |
   | 9 | Q51 | A | 961.36 |
   | 9 | Q51 | C | 957.11 |
   | 9 | Q49 | B | 547.11 |
   | 9 | Q49 | A | 480.53 |
   | 9 | Q49 | C | 447.81 |
   | 10 | Q37 | B | 374.70 |
   | 10 | Q37 | C | 220.39 |
   | 10 | Q37 | A | 269.24 |
   | 10 | Q82 | B | 548.10 |
   | 10 | Q82 | C | 365.57 |
   | 10 | Q82 | A | 376.11 |
   | 10 | Q13 | B | 428.18 |
   | 10 | Q13 | C | 357.54 |
   | 10 | Q13 | A | 408.92 |
   | 10 | Q51 | B | 945.20 |
   | 10 | Q51 | C | 953.52 |
   | 10 | Q51 | A | 980.11 |
   | 10 | Q49 | B | 630.90 |
   | 10 | Q49 | C | 446.88 |
   | 10 | Q49 | A | 478.14 |
   | 11 | Q37 | C | 222.41 |
   | 11 | Q37 | A | 276.63 |
   | 11 | Q37 | B | 371.93 |
   | 11 | Q82 | C | 404.28 |
   | 11 | Q82 | A | 364.76 |
   | 11 | Q82 | B | 525.96 |
   | 11 | Q13 | C | 359.87 |
   | 11 | Q13 | A | 420.22 |
   | 11 | Q13 | B | 435.26 |
   | 11 | Q51 | C | 948.79 |
   | 11 | Q51 | A | 930.46 |
   | 11 | Q51 | B | 941.99 |
   | 11 | Q49 | C | 451.62 |
   | 11 | Q49 | A | 532.44 |
   | 11 | Q49 | B | 530.52 |
   | 12 | Q37 | C | 217.61 |
   | 12 | Q37 | B | 379.53 |
   | 12 | Q37 | A | 268.14 |
   | 12 | Q82 | C | 374.32 |
   | 12 | Q82 | B | 532.70 |
   | 12 | Q82 | A | 376.97 |
   | 12 | Q13 | C | 359.89 |
   | 12 | Q13 | B | 429.14 |
   | 12 | Q13 | A | 410.70 |
   | 12 | Q51 | C | 955.23 |
   | 12 | Q51 | B | 946.26 |
   | 12 | Q51 | A | 936.31 |
   | 12 | Q49 | C | 440.45 |
   | 12 | Q49 | B | 531.40 |
   | 12 | Q49 | A | 496.80 |
   
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to