dragosmg commented on code in PR #13541:
URL: https://github.com/apache/arrow/pull/13541#discussion_r924410631


##########
r/src/compute-exec.cpp:
##########
@@ -125,6 +125,46 @@ std::shared_ptr<arrow::Schema> ExecNode_output_schema(
   return node->output_schema();
 }
 
+// [[arrow::export]]
+std::string ExecPlan_ToString(const std::shared_ptr<compute::ExecPlan>& plan) {
+  return plan->ToString();
+}
+
+// [[arrow::export]]
+std::string ExecPlan_ToStringWithSink(
+    const std::shared_ptr<compute::ExecPlan>& plan,
+    const std::shared_ptr<compute::ExecNode>& final_node, cpp11::list 
sort_options,
+    int64_t head = -1) {

Review Comment:
   I'm not entirely convinced `ExecPlan_prepare()` works in its current form - 
see 
https://github.com/apache/arrow/runs/7407118657?check_suite_focus=true#step:7:13756.
 I read the error as this line
   ```c++
   StopIfNotOk(plan->StartProducing());
   ```
   is still needed after 
   ```c++
   StopIfNotOk(plan->Validate());
   ```
   In its current form, I think `ExecPlan_prepare()` is doing a bit more than 
needed for my purpose. 



-- 
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