rok commented on a change in pull request #9758: URL: https://github.com/apache/arrow/pull/9758#discussion_r614155604
########## File path: cpp/src/arrow/compute/api_aggregate.h ########## @@ -37,43 +37,25 @@ class ExecContext; // ---------------------------------------------------------------------- // Aggregate functions -/// \addtogroup compute-concrete-options -/// @{ - -/// \brief Control Count kernel behavior -/// -/// By default, all non-null values are counted. -struct ARROW_EXPORT CountOptions : public FunctionOptions { - enum Mode { - /// Count all non-null values. - COUNT_NON_NULL = 0, - /// Count all null values. - COUNT_NULL, - }; - - explicit CountOptions(enum Mode count_mode = COUNT_NON_NULL) : count_mode(count_mode) {} - - static CountOptions Defaults() { return CountOptions(COUNT_NON_NULL); } - - enum Mode count_mode; -}; - -/// \brief Control MinMax kernel behavior +/// \brief Control general scalar aggregate kernel behavior /// /// By default, null values are ignored -struct ARROW_EXPORT MinMaxOptions : public FunctionOptions { +struct ARROW_EXPORT ScalarAggregateOptions : public FunctionOptions { enum Mode { - /// Skip null values - SKIP = 0, - /// Any nulls will result in null output - EMIT_NULL + /// Skip null values. + SKIPNA = 0, + /// Calculate over all values. + KEEPNA, Review comment: Indeed, I'll make it a boolean switch. That should make things easier to reason about too. -- 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