vibhatha commented on code in PR #33623:
URL: https://github.com/apache/arrow/pull/33623#discussion_r1067653859


##########
cpp/src/arrow/engine/substrait/serde.cc:
##########
@@ -188,6 +195,21 @@ Result<std::vector<compute::Declaration>> DeserializePlans(
                           registry, ext_set_out, conversion_options);
 }
 
+ARROW_ENGINE_EXPORT Result<compute::Declaration> DeserializePlan(
+    const Buffer& buf, const ExtensionIdRegistry* registry, ExtensionSet* 
ext_set_out,
+    const ConversionOptions& conversion_options) {
+  ARROW_ASSIGN_OR_RAISE(std::vector<compute::Declaration> top_level_decls,
+                        DeserializePlans(buf, MakeNoSinkDeclarationFactory(), 
registry,
+                                         ext_set_out, conversion_options));
+  if (top_level_decls.empty()) {
+    return Status::Invalid("No RootRel in plan");

Review Comment:
   Did you mean?
   
   ```suggestion
       return Status::Invalid("No RelRoot in plan");
   ```
   Except for `RelCommon` and `RelRoot`, all other classes have Rel as a suffix 
`ReadRel` :slightly_smiling_face: 



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