andygrove commented on a change in pull request #8222:
URL: https://github.com/apache/arrow/pull/8222#discussion_r492074780



##########
File path: rust/datafusion/src/physical_plan/hash_aggregate.rs
##########
@@ -48,9 +48,12 @@ use fnv::FnvHashMap;
 /// Hash aggregate modes
 #[derive(Debug, Copy, Clone)]
 pub enum AggregateMode {
+    /// Aggregate mode without any partial/intermediate aggregation
+    NoPartial,

Review comment:
       Spark uses the term `Complete`. Our existing names `Partial` and `Final` 
were based on Spark's naming.

##########
File path: rust/datafusion/src/physical_plan/hash_aggregate.rs
##########
@@ -48,9 +48,12 @@ use fnv::FnvHashMap;
 /// Hash aggregate modes
 #[derive(Debug, Copy, Clone)]
 pub enum AggregateMode {
+    /// Aggregate mode without any partial/intermediate aggregation
+    NoPartial,

Review comment:
       ```
   /**
    * An [[AggregateFunction]] with [[Complete]] mode is used to evaluate this 
function directly
    * from original input rows without any partial aggregation.
    * This function updates the given aggregation buffer with the original 
input of this
    * function. When it has processed all input rows, the final result of this 
function is returned.
    */
   case object Complete extends AggregateMode
   ```

##########
File path: rust/datafusion/src/physical_plan/hash_aggregate.rs
##########
@@ -374,6 +380,18 @@ impl RecordBatchReader for GroupedHashAggregateIterator {
                         col,
                         accums
                     ),
+                    DataType::LargeList(_) => {
+                        let len = array.len();
+                        let list_array =
+                            
array.as_any().downcast_ref::<LargeListArray>().unwrap();

Review comment:
       nit: I'd prefer that we use `expect` rather than `unwrap` so we can add 
a meaningful message.




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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to