Skip to content

feat: logical plan protobuf representation for range repartitioning#23030

Open
saadtajwar wants to merge 7 commits into
apache:mainfrom
saadtajwar:saadt/logical-protobuf-serialization-range-repartitioning
Open

feat: logical plan protobuf representation for range repartitioning#23030
saadtajwar wants to merge 7 commits into
apache:mainfrom
saadtajwar:saadt/logical-protobuf-serialization-range-repartitioning

Conversation

@saadtajwar

Copy link
Copy Markdown

Which issue does this PR close?

Rationale for this change

The range repartitioning scheme for logical plans does not currently have a protobuf representation.

What changes are included in this PR?

A protobuf representation of the RangeRepartition struct was added to datafusion.proto, and the codegened Rust types were created. Added logic for serializing and deserializing to and from the protobuf representation, and a roundtrip test as well!

Are these changes tested?

Yes! Added a test in roundtrip_logical_plan

Are there any user-facing changes?

No, adding internal protobuf serialization support for an existing logical plan variant

@github-actions github-actions Bot added the proto Related to proto crate label Jun 19, 2026
}

message RangeRepartition {
repeated SortExprNode expr = 1;

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed the physical plan field called this sort_expr, I could change this to match if needed?

Error::General(message.into())
}

pub fn parse_protobuf_range_split_point(

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copied this & serialize_range_split_point from the physical plan logic by @gene-bordegaray ! 😁

}

#[tokio::test]
async fn roundtrip_range_partitioning() -> Result<()> {

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy to add more tests here if needed!

Merge new MergeInto/DML imports from upstream with range
partitioning additions.
@saadtajwar

Copy link
Copy Markdown
Author

@gene-bordegaray tagging you in here - please let me know your thoughts! Looking forward to any feedback & working together further on this effort! 😁 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

proto Related to proto crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support logical protobuf serialization for range repartitioning

1 participant