mustafasrepo commented on code in PR #7129:
URL: https://github.com/apache/arrow-datafusion/pull/7129#discussion_r1277717756


##########
datafusion/core/src/physical_plan/aggregates/mod.rs:
##########
@@ -1370,6 +1370,54 @@ mod tests {
         )
     }
 
+    /// some mock data to aggregates
+    fn some_data_v2() -> (Arc<Schema>, Vec<RecordBatch>) {
+        // define a schema.
+        let schema = Arc::new(Schema::new(vec![
+            Field::new("a", DataType::UInt32, false),
+            Field::new("b", DataType::Float64, false),
+        ]));
+
+        // define data.
+        (
+            schema.clone(),
+            vec![
+                RecordBatch::try_new(
+                    schema.clone(),
+                    vec![
+                        Arc::new(UInt32Array::from(vec![2, 3, 4, 4])),
+                        Arc::new(Float64Array::from(vec![1.0, 2.0, 3.0, 4.0])),
+                    ],
+                )
+                .unwrap(),
+                RecordBatch::try_new(

Review Comment:
   Since this data is used to test `first_value` and `last_value`. Data is 
constructed such that first and last value result is at 2nd and 3rd partition. 
With this construction, we guarantee that expected result received is not 
accident, but merging works properly (It doesn't depend on the data insertion 
order). 



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

Reply via email to