Skip to content

refactor: Port IsNullExpr proto serialization hooks#22509

Open
chakkk309 wants to merge 1 commit into
apache:mainfrom
chakkk309:fix-is-null-proto-hooks
Open

refactor: Port IsNullExpr proto serialization hooks#22509
chakkk309 wants to merge 1 commit into
apache:mainfrom
chakkk309:fix-is-null-proto-hooks

Conversation

@chakkk309
Copy link
Copy Markdown

Which issue does this PR close?

Rationale for this change

This is part of #22418, which migrates built-in PhysicalExpr implementations away from the central protobuf serialization / deserialization chains.

IsNullExpr can now own its protobuf serialization through PhysicalExpr::try_to_proto and its deserialization through IsNullExpr::try_from_proto, matching the pattern introduced for Column and BinaryExpr.

What changes are included in this PR?

  • Adds PhysicalExpr::try_to_proto support for IsNullExpr.
  • Adds IsNullExpr::try_from_proto.
  • Wires IsNullExpr deserialization in from_proto.rs through the new hook.
  • Removes the old IsNullExpr serialization branch from the central to_proto.rs downcast chain.
  • Adds direct proto hook tests for:
    • successful IsNullExpr roundtrip
    • wrong protobuf expression variant
    • missing required child expression

Are these changes tested?

Yes.

I ran:

cargo test -p datafusion-physical-expr --features proto is_null_
cargo clippy -p datafusion-physical-expr --features proto --tests -- -D warnings
cargo test -p datafusion-proto --test proto_integration
cargo clippy --all-targets --all-features -- -D warnings
cargo fmt --all

@github-actions github-actions Bot added physical-expr Changes to the physical-expr crates proto Related to proto crate labels May 25, 2026
@chakkk309 chakkk309 force-pushed the fix-is-null-proto-hooks branch from 2f3448a to 74e4190 Compare May 25, 2026 13:37
@chakkk309 chakkk309 force-pushed the fix-is-null-proto-hooks branch from 74e4190 to ff682e2 Compare May 25, 2026 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

physical-expr Changes to the physical-expr crates proto Related to proto crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Port IsNullExpr to use try_to_proto / try_from_proto

1 participant