refactor: add try_to_proto / try_from_proto to DynamicFilterPhysicalExpr#22452
refactor: add try_to_proto / try_from_proto to DynamicFilterPhysicalExpr#22452AnuragRaut08 wants to merge 2 commits into
try_to_proto / try_from_proto to DynamicFilterPhysicalExpr#22452Conversation
Part of apache#22434. Adds try_to_proto / try_from_proto to DynamicFilterPhysicalExpr so it participates in the expression-local serialization pattern introduced in apache#21929. The centralized arms in to_proto.rs / from_proto.rs remain as fallbacks for now. Cleanup of the pub-for-proto scaffolding (from_parts, inner, original_children, remapped_children) can follow once decode reads state directly via try_from_proto.
|
All three existing dynamic filter roundtrip tests pass locally:
Happy to iterate quickly on any feedback. Also open to tackling the pub-for-proto scaffolding cleanup ( |
|
Do you want to delete the public methods in this PR? I reviewed your current commit and it looks good. Here's a commit removing the public methods you may want to cherry-pick. |
| /// | ||
| /// Encodes `children`, `remapped_children`, and the atomically-captured | ||
| /// `Inner` state (expression id, generation, current expr, is_complete). | ||
| pub fn try_to_proto( |
There was a problem hiding this comment.
I don't think this path is being used. I think it needs to move to the impl PhysicalExpr block to override the default PhysicalExpr::try_to_proto implementation.
There was a problem hiding this comment.
@AnuragRaut08 are you able to move these methods and add tests?
|
#22596 adds an |
|
Thanks, I’m working through the rebase now. After rebasing onto latest I’ve moved |
Which issue does this PR close?
Part of #22434
What changes are included?
Adds
try_to_protoandtry_from_prototoDynamicFilterPhysicalExprso it participates in the expression-local serialization pattern
introduced in #21929.
The centralized arms in
to_proto.rs/from_proto.rsremain asfallbacks for now. Cleanup of the pub-for-proto scaffolding
(
from_parts,inner,original_children,remapped_children) canfollow in a separate PR once decode reads state directly.
Are these changes tested?
Yes — all three existing dynamic filter roundtrip tests pass:
test_dynamic_filter_roundtrip_dedupetest_dynamic_filter_plan_roundtrip_dedupetest_dynamic_filter_expression_id_is_stable_between_serializationsAre there any user-facing changes?
No.