adriangb commented on code in PR #20019:
URL: https://github.com/apache/datafusion/pull/20019#discussion_r2734524933


##########
datafusion/physical-plan/src/aggregates/mod.rs:
##########
@@ -155,7 +172,21 @@ impl AggregateMode {
             AggregateMode::Partial
             | AggregateMode::Single
             | AggregateMode::SinglePartitioned => true,
-            AggregateMode::Final | AggregateMode::FinalPartitioned => false,
+            AggregateMode::Final
+            | AggregateMode::FinalPartitioned
+            | AggregateMode::PartialReduce => false,
+        }
+    }
+
+    /// Checks whether this aggregation step produces final output values
+    /// (as opposed to intermediate accumulator state).
+    pub fn is_last_stage(&self) -> bool {

Review Comment:
   I think it could be helpful to have your table and the description of "tells 
us in which row/column" as docstrings on `is_last_stage` and `is_first_stage`.
   
   Would it also be easier to understand if this was called 
`output_final_results()` or `output_mode() -> OutputMode` where `enum 
OutputMode { Partial, Final }`?



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