icexelloss commented on code in PR #34606:
URL: https://github.com/apache/arrow/pull/34606#discussion_r1140292433


##########
cpp/src/arrow/engine/substrait/options.cc:
##########
@@ -163,8 +163,8 @@ class DefaultExtensionProvider : public 
BaseExtensionProvider {
     ARROW_ASSIGN_OR_RAISE(
         auto decl,
         conv_opts.named_tap_provider(named_tap_rel.kind(), input_decls,
-                                     named_tap_rel.name(), 
std::move(renamed_schema)));
-    return RelationInfo{{std::move(decl), std::move(renamed_schema)}, 
std::nullopt};
+                                     named_tap_rel.name(), renamed_schema));

Review Comment:
   I think passing `renamed_schema` without `std::move` is correct because 
`std::move` would nullify all other shared pointers and cause segment fault 
when either named_tap_provider or Declaration info tries to access it.



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