Commit 120b151
feat: implement protobuf converter trait to allow control over serialization and deserialization processes (apache#19437)
- Closes apache#18477
This PR adds a new trait for converting to and from Protobuf objects and
Physical expressions and plans.
- Add `PhysicalExtensionProtoCodec` and default implementation.
- Update all methods in the physical encoding/decoding methods to use
this trait.
- Added two examples
- Added unit test
Two examples and round trip unit test are added.
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 baa3f1b commit 120b151
12 files changed
Lines changed: 2228 additions & 524 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 | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| 62 | + | |
62 | 63 | | |
63 | 64 | | |
64 | 65 | | |
| |||
0 commit comments