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

   ## Which issue does this PR relate to?
   
   - This is a behavior-neutral prerequisite for #24438.
   
   ## Rationale for this change
   
   `InputOrderMode` currently serves two different purposes inside 
`AggregateExec`:
   
   1. it records evidence about how the input is ordered relative to the 
grouping expressions; and
   2. it selects the runtime mechanism that decides when a group is complete 
and may be emitted.
   
   Those concepts happen to map one-to-one today, but they are not the same 
concept. Separating them makes the aggregate execution contract explicit 
without changing plans, results, ordering metadata, or public APIs.
   
   ## What changes are included?
   
   - Add a private `GroupCompletionMode::{None, Partial, Full}` capability.
   - Derive it exactly from the existing `InputOrderMode` in `AggregateExec` 
construction.
   - Pass the capability, rather than ordering evidence, through the ordered 
aggregate tables, streams, and spill replay paths.
   - Keep `InputOrderMode` as the source of required/output ordering and 
`maintains_input_order` behavior.
   - Preserve the existing public `GroupOrdering::try_new(&InputOrderMode)` API 
as a compatibility wrapper.
   
   Because the conversion remains one-to-one in this PR, this is intended to be 
a mechanical, behavior-neutral refactor.
   
   ## Stack
   
   This is the first of three small commits for #24438. It can be reviewed and 
merged independently. The later commits add a fail-closed source assertion and 
then let `AggregateExec` consume an exact match.
   
   ## Are these changes tested?
   
   Yes:
   
   - `cargo test -p datafusion-physical-plan --lib` (1,784 tests)
   - `cargo check -p datafusion-physical-plan --all-features`
   - the complete three-commit stack also passes strict clippy and rustdoc 
checks
   
   ## Are there any user-facing changes?
   
   No. `GroupCompletionMode` is crate-private, and the existing public API 
remains available.
   


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