aucahuasi commented on a change in pull request #11923:
URL: https://github.com/apache/arrow/pull/11923#discussion_r768702599



##########
File path: cpp/src/arrow/compute/exec/sink_node.cc
##########
@@ -274,11 +284,15 @@ struct OrderBySinkNode final : public SinkNode {
                                               sink_options.backpressure);
   }
 
-  void InputReceived(ExecNode* input, ExecBatch batch) override {
+  void InputReceived(ExecNode* input, std::function<Result<ExecBatch>()> task) 
override {
     DCHECK_EQ(input, inputs_[0]);
-
-    auto maybe_batch = batch.ToRecordBatch(inputs_[0]->output_schema(),
-                                           
plan()->exec_context()->memory_pool());
+    auto batch = task();
+    if (!batch.ok()) {
+      ErrorIfNotOk(batch.status());
+      return;
+    }
+    auto maybe_batch = batch.ValueUnsafe().ToRecordBatch(
+        inputs_[0]->output_schema(), plan()->exec_context()->memory_pool());

Review comment:
       I think this should call to SubmitTask, but once again I think 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]


Reply via email to