timsaucer commented on code in PR #19437:
URL: https://github.com/apache/datafusion/pull/19437#discussion_r2724262264


##########
docs/source/library-user-guide/upgrading.md:
##########
@@ -154,6 +154,48 @@ The builder pattern is more efficient as it computes 
properties once during `bui
 
 Note: `with_default_selectivity()` is not deprecated as it simply updates a 
field value and does not require the overhead of the builder pattern.
 
+### Protobuf conversion trait added
+
+A new trait, `PhysicalProtoConverterExtension`, has been added to the 
`datafusion-proto`
+crate. This is used for controlling the process of conversion of physical 
plans and
+expressions to and from their protobuf equivalents. The methods for conversion 
now
+require an additional parameter. Most users can simply use the 
`DefaultPhysicalProtoConverter`
+implementation.
+
+For conversion from protobuf types to their physical types:
+
+**Before:**
+
+```rust,ignore
+let plan = proto_plan.try_into_physical_plan(ctx, codec)?;
+let expr = parse_physical_expr(proto_expr, ctx, input_schema, codec)?;
+```
+
+**After:**
+
+```rust,ignore
+let converter = DefaultPhysicalProtoConverter {};
+let plan = proto_plan.try_into_physical_plan(ctx, codec, &converter)?;

Review Comment:
   Good idea.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to