aucahuasi commented on a change in pull request #11923:
URL: https://github.com/apache/arrow/pull/11923#discussion_r768701574
##########
File path: cpp/src/arrow/compute/exec/sink_node.cc
##########
@@ -95,10 +95,15 @@ class SinkNode : public ExecNode {
Future<> finished() override { return finished_; }
- void InputReceived(ExecNode* input, ExecBatch batch) override {
+ void InputReceived(ExecNode* input, std::function<Result<ExecBatch>()> task)
override {
DCHECK_EQ(input, inputs_[0]);
- bool did_push = producer_.Push(std::move(batch));
+ auto batch = task();
+ if (!batch.ok()) {
+ ErrorIfNotOk(batch.status());
+ return;
+ }
+ bool did_push = producer_.Push(batch.MoveValueUnsafe());
Review comment:
SubmitTask is a method that is going to be part of the interface of the
Scheduler, this part will need to changes in the next PRs related to the
scheduler
--
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]