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 2022/05/19 14:51:25 UTC

[GitHub] [arrow] sanjibansg commented on a diff in pull request #13181: ARROW-15534: [C++] Add convenience function to substrait consumer to create plan instead of declaration

sanjibansg commented on code in PR #13181:
URL: https://github.com/apache/arrow/pull/13181#discussion_r877169225


##########
cpp/src/arrow/engine/substrait/serde.cc:
##########
@@ -86,6 +86,20 @@ Result<std::vector<compute::Declaration>> DeserializePlan(
   return sink_decls;
 }
 
+Result<compute::ExecPlan> DeserializePlan(const Buffer& buf,
+                                          const ConsumerFactory& consumer_factory,
+                                          ExtensionSet* ext_set_out) {
+  ARROW_ASSIGN_OR_RAISE(auto declarations,
+                        DeserializePlans(buf, consumer_factory, ext_set_out));
+  if (declarations.size() > 1) {
+    return Status::Invalid("Substrait plan cannot have multiple root relations");

Review Comment:
   Yes, right, made the change, thanks!



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