Commit ea84352
feat: implement protobuf converter trait to allow control over serialization and deserialization processes (apache#19437)
## Which issue does this PR close?
- Closes apache#18477
## Rationale for this change
This PR adds a new trait for converting to and from Protobuf objects and
Physical expressions and plans.
## What changes are included in this PR?
- Add `PhysicalExtensionProtoCodec` and default implementation.
- Update all methods in the physical encoding/decoding methods to use
this trait.
- Added two examples
- Added unit test
## Are these changes tested?
Two examples and round trip unit test are added.
## Are there any user-facing changes?
If users are going through the recommended interfaces in the
documentation, `logical_plan_to_bytes` and `logical_plan_from_bytes`
they will have no user facing change. If they are instead calling into
the inner methods `PhysicalPlanNode::try_from_physical_plan` and so on,
then they will need to provide a proto converter. A default
implementation is provided.
---------
Co-authored-by: Adrian Garcia Badaracco <1755071+adriangb@users.noreply.github.com>1 parent d972007 commit ea84352
12 files changed
Lines changed: 2064 additions & 539 deletions
File tree
- datafusion-examples
- examples
- custom_data_source
- proto
- datafusion/proto
- src
- bytes
- physical_plan
- tests/cases
- docs/source/library-user-guide
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| 65 | + | |
65 | 66 | | |
66 | 67 | | |
67 | 68 | | |
| |||
0 commit comments