rtpsw commented on code in PR #14352:
URL: https://github.com/apache/arrow/pull/14352#discussion_r1019613693
##########
cpp/src/arrow/compute/exec/aggregate.h:
##########
@@ -32,14 +32,24 @@ namespace arrow {
namespace compute {
namespace internal {
-/// Internal use only: helper function for testing HashAggregateKernels.
+/// Internal use only: helpers for PyArrow and testing HashAggregateKernels.
/// For public use see arrow::compute::Grouper or create an execution plan
/// and use an aggregate node.
+
ARROW_EXPORT
Result<Datum> GroupBy(const std::vector<Datum>& arguments, const
std::vector<Datum>& keys,
+ const std::vector<Datum>& segment_keys,
const std::vector<Aggregate>& aggregates, bool
use_threads = false,
ExecContext* ctx = default_exec_context());
+using GroupByCallback = std::function<Status(const Datum&)>;
+
+ARROW_EXPORT
+Status GroupBy(const std::vector<Datum>& arguments, const std::vector<Datum>&
keys,
+ const std::vector<Datum>& segment_keys,
+ const std::vector<Aggregate>& aggregates, GroupByCallback
callback,
+ bool use_threads = false, ExecContext* ctx =
default_exec_context());
Review Comment:
Also by `PyArrow` via the code-path `TableGroupBy` -> `_group_by` ->
`GroupBy`.
--
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]