Skip to content

Commit 120b151

Browse files
timsauceradriangb
authored andcommitted
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

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

datafusion-examples/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ mimalloc = { version = "0.1", default-features = false }
5959
object_store = { workspace = true, features = ["aws", "http"] }
6060
prost = { workspace = true }
6161
rand = { workspace = true }
62+
serde = { version = "1", features = ["derive"] }
6263
serde_json = { workspace = true }
6364
strum = { workspace = true }
6465
strum_macros = { workspace = true }

0 commit comments

Comments
 (0)