Dandandan opened a new pull request, #27635:
URL: https://github.com/apache/datafusion/pull/27635

   ## Which issue does this PR close?
   
   No linked issue.
   
   ## Rationale for this change
   
   The local object store already coalesces adjacent byte ranges. Some decoder 
requests contain ranges separated by small gaps. The question for this draft is 
whether fewer local reads justify fetching those extra bytes.
   
   ## What changes are included in this PR?
   
   Within one decoder request, combine ordered nonoverlapping ranges across a 
gap of at most 4 KiB when the gap is at most one eighth of the next payload. 
Cap a combined read at 2 MiB and slice the buffers back into request order.
   
   ## What is the testing strategy for this PR?
   
   Compare SF1 with Parquet predicate pushdown enabled in both arms. Across all 
22 TPC-H and 99 TPC-DS queries, the extra grouping fired on seven TPC-DS 
queries. Q24 saved four requested ranges. Warm and filesystem-cold SQL timing 
did not establish a consistent latency benefit.
   
   Independent release builds from `04b910869` on macOS arm64, using DuckDB 
1.4.1 SF1 Parquet data, upstream query files and ten target partitions. For 
each arm, five fresh processes ran the original query seven times each. Values 
are median warm SQL times in milliseconds, excluding the first execution of 
each process. Each independently built patch also completed all 22 TPC-H and 99 
TPC-DS queries with baseline row counts.
   
   | Query | Baseline ms | Candidate ms | Change |
   | --- | ---: | ---: | ---: |
   | TPC-DS Q12 | 9.95 | 10.00 | +0.5% |
   | TPC-DS Q17 | 32.35 | 31.30 | -3.2% |
   | TPC-DS Q20 | 9.75 | 10.05 | +3.1% |
   | TPC-DS Q24 | 45.10 | 44.80 | -0.7% |
   | TPC-DS Q25 | 27.40 | 27.55 | +0.5% |
   | TPC-DS Q29 | 37.65 | 37.25 | -1.1% |
   | TPC-DS Q98 | 16.00 | 15.90 | -0.6% |
   | TPC-H Q18 | 53.30 | 53.85 | +1.0% |
   
   Both arms enable Parquet filter pushdown. With cold input files, Q24 changed 
from 55.2 to 54.6 ms and Q98 from 28.0 to 29.2 ms (nine trials per arm on fresh 
APFS clones verified to have zero resident pages before process launch). This 
supports a reduction in requested ranges, with mixed latency results.
   
   Reproduce a query from the benchmarks directory with:
   
   ```sh
   DATAFUSION_EXECUTION_PARQUET_PUSHDOWN_FILTERS=true dfbench tpcds -p 
"$TPCDS_PARQUET" -Q ../datafusion/core/tests/tpc-ds -q 12 -n 10 -i 7
   DATAFUSION_EXECUTION_PARQUET_PUSHDOWN_FILTERS=true dfbench tpch -p 
"$TPCH_DATA" -f parquet -q 18 -n 10 -i 7
   ```
   
   ## Are there any user-facing changes?
   
   The reader can request a small number of extra bytes to reduce the number of 
ranges. This remains experimental.
   
   Implementation and benchmark preparation were AI-assisted.
   


-- 
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