dragosmg commented on code in PR #13541:
URL: https://github.com/apache/arrow/pull/13541#discussion_r927375092
##########
r/src/compute-exec.cpp:
##########
@@ -125,6 +138,16 @@ std::shared_ptr<arrow::Schema> ExecNode_output_schema(
return node->output_schema();
}
+// [[arrow::export]]
+std::string ExecPlan_BuildAndShow(const std::shared_ptr<compute::ExecPlan>&
plan,
+ const std::shared_ptr<compute::ExecNode>&
final_node,
+ cpp11::list sort_options, cpp11::strings
metadata,
+ int64_t head = -1) {
+ auto prepared_plan = ExecPlan_prepare(plan, final_node, sort_options,
metadata, head);
+ arrow::StopIfNotOk(prepared_plan.first->StartProducing());
Review Comment:
@nealrichardson I think `StartProducing()` is central to this (let's call it
the _BuildAndShow_) approach. I couldn't get it to work without it. Extracting
the duplicated code in `ExecPlan_prepare` doesn't work without starting the
plan.
My
https://github.com/apache/arrow/commit/f40e5d289553543ce070ac67bbcf565b289548b3
commit, submitted 3 days ago - was AFAICT exactly what you suggest and it
didn't work.
So was Dewey's
https://github.com/apache/arrow/pull/13541/commits/fbb4c1ee13b303e59e7631ec1770d41785fbed0e
(submitted 2 days ago).
I will revert to this state minus the line you suggested we delete and see
where that takes us.
--
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]