vibhatha commented on code in PR #13401:
URL: https://github.com/apache/arrow/pull/13401#discussion_r956904559
##########
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>&,
+ const
ConversionOptions&);
+
+/// \brief Serialize a Declaration and produces a Substrait Rel.
+///
+/// Note that in order to provide a generic interface for ToProto for
+/// declaration it is not specialized for each relation within the Substrait
Rel.
+/// Rather a serialized relation is set as a member for the Substrait Rel
+/// (partial Relation) which is later on extracted to update a Substrait Rel
+/// which would be included in the fully serialized Acero Exec Plan.
+/// The ExecNode or ExecPlan is not used in this context as Declaration is
preferred
+/// in the Substrait space rather than internal components of Acero execution
engine.
Review Comment:
Ah this was part of what I did to write the generic interface for registry.
I didn't update this properly. Now it is simplified.
--
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]