You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/12/11 03:02:46 UTC

[GitHub] [arrow] westonpace commented on a change in pull request #11923: ARROW-14970: [C++] Make ExecNodes can generate/consume tasks

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



##########
File path: cpp/src/arrow/compute/exec/exec_plan.h
##########
@@ -226,6 +227,8 @@ class ARROW_EXPORT ExecNode {
   std::string ToString() const;
 
  protected:
+  static inline Result<ExecBatch> IdentityTask(ExecBatch batch) { return batch; }
+

Review comment:
       This isn't really a task though is it.  I was expecting something like...
   
   ```
   static inline std::function<Result<ExecBatch>(ExecBatch)> IdentityTask() { return [] (ExecBatch batch) { return batch; }; }
   ```

##########
File path: cpp/src/arrow/compute/exec/exec_plan.h
##########
@@ -134,8 +134,9 @@ class ARROW_EXPORT ExecNode {
   /// - these are allowed to call back into PauseProducing(), ResumeProducing()
   ///   and StopProducing()
 
-  /// Transfer input batch to ExecNode
-  virtual void InputReceived(ExecNode* input, ExecBatch batch) = 0;
+  /// Transfer the input task to ExecNode
+  virtual void InputReceived(ExecNode* input, ExecBatch batch,
+                             std::function<Result<ExecBatch>(ExecBatch)> task) = 0;

Review comment:
       I would expect the signature to be:
   
   ```
   virtual void InputReceived(ExecNode* input, std::function<Result<ExecBatch>(ExecBatch)> task) = 0;
   ```
   
   I'm not sure what it means to have `batch` and `task`?
   
   Is this some kind of intermediate step between the two models?




-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org