icexelloss commented on code in PR #34885:
URL: https://github.com/apache/arrow/pull/34885#discussion_r1157357557
##########
cpp/src/arrow/acero/aggregate_node.cc:
##########
@@ -85,8 +86,43 @@ std::vector<TypeHolder> ExtendWithGroupIdType(const
std::vector<TypeHolder>& in_
return aggr_in_types;
}
-Result<const HashAggregateKernel*> GetKernel(ExecContext* ctx, const
Aggregate& aggregate,
+void DefaultAggregateOptions(Aggregate* aggregate_ptr,
+ const std::shared_ptr<Function> function) {
+ Aggregate& aggregate = *aggregate_ptr;
+ if (aggregate.options == nullptr) {
+ DCHECK(!function->doc().options_required);
+ const auto* default_options = function->default_options();
+ if (default_options) {
+ aggregate.options = default_options->Copy();
+ }
+ }
+}
+
+using GetKernel = std::function<Result<const Kernel*>(ExecContext*, Aggregate*,
+ const
std::vector<TypeHolder>&)>;
+
+Result<const Kernel*> GetScalarAggregateKernel(ExecContext* ctx, Aggregate*
aggregate_ptr,
Review Comment:
What is this used for?
--
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]