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

   ## What changes are included in this PR?
   
   TPC-DS Q31 refers to the same grouped store and web sales for three 
quarters. Each alias previously rebuilt a copy of the grouped input. Where 
equality joins identify every remaining grouping key, compute the measures once 
and select each period with a filtered aggregate. A count requires all periods 
to exist even when a measure is null. The rule requires matching listing-table 
providers and restricts the aggregate expressions and consumer shape.
   
   On the SF1 fixture the physical plan goes from 18 Parquet scans and 17 hash 
joins to 6 scans and 5 hash joins. The unit test covers missing periods, a 
nullable join key, a null measure, and duplicate fact rows.
   
   ## What is the testing strategy for this PR?
   
   TPC-DS SF1, unchanged upstream SQL, local Parquet with ten target 
partitions. Each arm ran in a fresh process, alternating first position across 
nine pairs. Each process ran one warmup and four timed executions. All result 
rows matched across arms. Median of process medians in milliseconds.
   
   | Query | Baseline | Draft | Faster pairs |
   |---|---:|---:|---:|
   | Q31 | 67 | 27.5 | 9/9 |
   
   ## Are there any user-facing changes?
   
   Eligible queries can show the rewritten plan in EXPLAIN.
   


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