pitrou commented on code in PR #43799:
URL: https://github.com/apache/arrow/pull/43799#discussion_r1736669728


##########
cpp/src/arrow/acero/aggregate_node_test.cc:
##########
@@ -210,5 +210,36 @@ TEST(GroupByNode, NoSkipNulls) {
   AssertExecBatchesEqualIgnoringOrder(out_schema, {expected_batch}, 
out_batches.batches);
 }
 
+TEST(ScalarAggregateNode, AnyAll) {
+  // GH-43768: boolean_any and boolean_all with constant input should work well
+  // when min_count != 0.
+  std::shared_ptr<Schema> in_schema = schema({field("not_used", int32())});
+  std::shared_ptr<Schema> out_schema = schema({field("agg_out", boolean())});
+  std::vector<ExecBatch> batches{
+      ExecBatchFromJSON({int32()}, "[[42], [42], [42], [42]]")};

Review Comment:
   Is it possible to test more cases? Something like:
   ```c++
     struct AnyAllCase {
       std::string batches_json;
       std::string expected_json;
     };
     std::vector<AnyAllCase> cases {
       {"[[42], []]", "[[false]]"},
       {"[[42, 42], []]", "[[true]]"},
       {"[[42], [42]]", "[[true]]"},
       {"[[42], [42, 42]]", "[[true]]"},
       {"[[42], []]", "[[false]]"},
       {"[[42, 42], []]", "[[true]]"},
       {"[[42], [42]]", "[[true]]"},
       {"[[42], [42, 42]]", "[[true]]"},
     };
   ```
   
   Also vary the `skip_nulls` and the boolean literal.



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