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

   ## Which issue does this PR close?
   
   - None. It adds a baseline for a follow-up that revisits #24454 (slicing a 
hash join's probe columns when the probe rows are a contiguous run).
   
   ## Rationale for this change
   
   Every `hj` query outputs only the join key or `count(*)`, so none of them 
measures what a hash join costs when the probe side carries columns past the 
join. In a fact-to-dimension join it usually does: TPC-DS q04, q11 and q74 
carry several `DECIMAL` columns of the sales tables through two joins into an 
aggregation. #24454 tried slicing such columns instead of copying them and saw 
no change on the existing suites; this adds queries that exercise that copy, so 
a change to how a hash join builds its output columns has a baseline on `main`.
   
   ## What changes are included in this PR?
   
   Six queries on the TPC-H data `hj` already uses. Each sums `lineitem`'s four 
`DECIMAL(15,2)` columns after the join, except the Q33 control:
   
   | Query | Build side | Probe side (`lineitem`, 60M rows at SF10) |
   |---|---|---|
   | Q29 | `supplier` (100K rows, `CollectLeft`) | every row finds one supplier 
|
   | Q30 | `supplier` without one in ten | about 90% of the rows find one |
   | Q31 | `orders` (15M rows, `Partitioned`) | every row finds one order |
   | Q32 | `orders`, then `customer` (two joins) | every row finds one row in 
each |
   | Q33 | as Q29, without the payload (`count(*)`) | every row finds one 
supplier |
   | Q34 | `supplier` twice (two rows a key) | every row finds two |
   
   Also: a query that does not force `Partitioned` mode now gets the session's 
`CollectLeft` thresholds back. Before, once Q23 set them to 0, every later 
query in a full run planned as `Partitioned`, unlike when run alone. Queries 
1-28 plan as before (the ones after Q23 all force `Partitioned`).
   
   ## What is the testing strategy for this PR?
   
   It only adds benchmark queries; each checks that its plan has a 
`HashJoinExec`. They run with `./bench.sh run hj` (or `dfbench hj --query 29`). 
At SF10 on 8 x86 cores an iteration takes 0.43 s (Q33) to 3.4 s (Q32).
   
   ## Are there any user-facing changes?
   
   No.
   
   This PR was prepared with AI assistance (Claude Code) and reviewed by me.
   
   cc @andygrove for review
   


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