joroKr21 commented on code in PR #8511:
URL: https://github.com/apache/arrow-datafusion/pull/8511#discussion_r1423764396


##########
datafusion/physical-expr/src/aggregate/count.rs:
##########
@@ -121,14 +121,25 @@ impl GroupsAccumulator for CountGroupsAccumulator {
         // Add one to each group's counter for each non null, non
         // filtered value
         self.counts.resize(total_num_groups, 0);
-        accumulate_indices(
-            group_indices,
-            values.nulls(), // ignore values
-            opt_filter,
-            |group_index| {
-                self.counts[group_index] += 1;
-            },
-        );
+        let index_fn = |group_index| {
+            self.counts[group_index] += 1;
+        };
+
+        if values.data_type() == &DataType::Null {
+            accumulate_indices(
+                group_indices,
+                values.logical_nulls().as_ref(),
+                opt_filter,
+                index_fn,
+            );
+        } else {
+            accumulate_indices(
+                group_indices,
+                values.nulls(),

Review Comment:
   Oh ok, then we can use it I guess. I assumed that's why they don't want to 
change it in Arrow.



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