You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2020/10/13 12:56:40 UTC

[GitHub] [arrow] jorisvandenbossche commented on a change in pull request #8294: ARROW-1846: [C++][Compute] Implement "any" reduction kernel for boolean data

jorisvandenbossche commented on a change in pull request #8294:
URL: https://github.com/apache/arrow/pull/8294#discussion_r503927482



##########
File path: cpp/src/arrow/compute/api_aggregate.h
##########
@@ -142,6 +142,20 @@ Result<Datum> MinMax(const Datum& value,
                      const MinMaxOptions& options = MinMaxOptions::Defaults(),
                      ExecContext* ctx = NULLPTR);
 
+/// \brief Test whether any element in a boolean array evaluates to true.
+///
+/// This function returns true if any of the elements in the array evaluates
+/// to true and false otherwise. Null values are taken to evaluate to false.

Review comment:
       Is this the behaviour we want? (the *"null values are taken to evaluate to false."*
   
   Any/all are of course not the most typical reductions (so I am also not fully sure about the desired behaviour), but, for other reductions we actually skip nulls. And skipping nulls is not the same as evaluating them to False
   
   (somewhat related to my comment at https://github.com/apache/arrow/pull/8294#issuecomment-701357437)
   




----------------------------------------------------------------
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:
users@infra.apache.org