Rich-T-kid opened a new pull request, #27272:
URL: https://github.com/apache/datafusion/pull/27272

   ## What does this PR do?
   
   Adds a `GroupValues` path for a single dictionary-encoded group key. It 
resolves each dictionary value to a group once, then maps the row keys directly 
to those groups instead of using the general multi-column hash table and 
equality buffers.
   
   The existing path is unchanged for multi-column grouping.
   
   Related to #24822.
   
   ## Benchmarks
   
   Target query over the TPC-H SF10 `lineitem` Parquet file (59,986,052 rows, 7 
groups), with RLE dictionary reads enabled, one partition, and an 8,192 row 
batch size:
   
   ```sql
   SELECT l_shipmode, COUNT(*), SUM(l_extendedprice)
   FROM lineitem
   GROUP BY l_shipmode;
   ```
   
   Two five-iteration legs compared base `14b3edd9a` with this branch:
   
   | | Base median | This PR median |
   |---|---:|---:|
   | Leg 1 | 1,068.9 ms | 961.5 ms |
   | Leg 2 | 1,075.0 ms | 896.8 ms |
   
   The operator metrics from the quiet pair show where the time moved:
   
   | Metric | Base | This PR | Change |
   |---|---:|---:|---:|
   | Calculate group IDs | 306.1 ms | 139.1 ms | 54.6% faster |
   | AggregateExec | 427.1 ms | 262.7 ms | 38.5% faster |
   | Parquet scan | 585.5 ms | 587.2 ms | flat |
   | Query wall time | 1,065.7 ms | 903.1 ms | 15.3% faster |
   
   The existing dictionary benchmark's five single-column cases improved by 
54-92% at 5%, 10%, and 25% cardinality, with and without nulls. Its two 
multi-column controls were within 1.2%.
   
   ## Tests
   
   - `cargo test -p datafusion-physical-plan aggregates::group_values --lib`
   - `cargo clippy -p datafusion-physical-plan --lib --tests -- -D warnings`
   - pre-push `fmt`, workspace `clippy`, and `typos` checks
   


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