Skip to content

Commit ea84352

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

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
@@ -62,6 +62,7 @@ mimalloc = { version = "0.1", default-features = false }
6262
object_store = { workspace = true, features = ["aws", "http"] }
6363
prost = { workspace = true }
6464
rand = { workspace = true }
65+
serde = { version = "1", features = ["derive"] }
6566
serde_json = { workspace = true }
6667
strum = { workspace = true }
6768
strum_macros = { workspace = true }

0 commit comments

Comments
 (0)