chakkk309 opened a new pull request, #22550: URL: https://github.com/apache/datafusion/pull/22550
## Which issue does this PR close? - Closes #22429. ## Rationale for this change This is part of #22418, which migrates built-in `PhysicalExpr` implementations away from the central protobuf serialization / deserialization chains. `TryCastExpr` can now own its protobuf serialization through `PhysicalExpr::try_to_proto` and its deserialization through `TryCastExpr::try_from_proto`, matching the pattern used by previously migrated physical expressions. ## What changes are included in this PR? - Adds `PhysicalExpr::try_to_proto` support for `TryCastExpr`. - Adds `TryCastExpr::try_from_proto`. - Wires `TryCastExpr` deserialization in `from_proto.rs` through the new hook. - Removes the old `TryCastExpr` serialization branch from the central `to_proto.rs` downcast chain. - Adds direct proto hook tests for successful encoding / decoding and invalid protobuf inputs. ## Are these changes tested? Yes. I ran: ```bash cargo fmt --all --check git diff --check cargo test -p datafusion-physical-expr --features proto try_cast cargo test -p datafusion-proto --test proto_integration cargo clippy -p datafusion-physical-expr --features proto --tests -- -D warnings cargo clippy -p datafusion-proto --tests -- -D warnings ``` ## Are there any user-facing changes? No. This is an internal protobuf serialization refactor for `TryCastExpr`; the wire format remains unchanged. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
