vibhatha commented on code in PR #13401: URL: https://github.com/apache/arrow/pull/13401#discussion_r956907399
########## cpp/src/arrow/engine/substrait/relation_internal.h: ########## @@ -40,9 +40,46 @@ struct DeclarationInfo { int num_columns; }; +/// \brief A function to extract Acero Declaration from a Substrait Rel object ARROW_ENGINE_EXPORT Result<DeclarationInfo> FromProto(const substrait::Rel&, const ExtensionSet&, const ConversionOptions&); +/// \brief Serializes a Declaration, produce a Substrait Rel and update the global +/// Substrait plan. A Substrait Rel is passed as a the plan and it is updated with +/// corresponding Declaration passed for serialization. +/// +/// Note that this is a rather a helper method useful to fuse a partially serialized +/// plan with another plan. The reason for having a partially serialized plan is to +/// avoid unnecessary complication and enable partial plan serialization without +/// affecting a global plan. Since kept as unique_ptr resources are relased efficiently +/// upon releasing for the global plan. +ARROW_ENGINE_EXPORT Status SerializeAndCombineRelations(const compute::Declaration&, + ExtensionSet*, + std::unique_ptr<substrait::Rel>&, Review Comment: Thanks for noting this. -- 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-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org