aucahuasi commented on a change in pull request #11923:
URL: https://github.com/apache/arrow/pull/11923#discussion_r768695291
##########
File path: cpp/src/arrow/compute/exec/aggregate_node.cc
##########
@@ -175,18 +175,21 @@ class ScalarAggregateNode : public ExecNode {
return Status::OK();
}
- void InputReceived(ExecNode* input, ExecBatch batch) override {
+ void InputReceived(ExecNode* input, std::function<Result<ExecBatch>()> task)
override {
DCHECK_EQ(input, inputs_[0]);
auto thread_index = get_thread_index_();
-
- if (ErrorIfNotOk(DoConsume(std::move(batch), thread_index))) return;
+ auto prev = task();
+ if (!prev.ok()) {
+ ErrorIfNotOk(prev.status());
+ return;
+ }
+ if (ErrorIfNotOk(DoConsume(prev.MoveValueUnsafe(), thread_index))) return;
Review comment:
> plan_->scheduler()->SubmitTask(std::move(func));
Yes that is the idea, but this PR is to enable that construction later, this
PR is not going to define any scheduler or submitting logic.
--
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]