Skip to content

Conversation

mnpw
Copy link
Contributor

@mnpw mnpw commented Oct 6, 2025

Which issue does this PR close?

What changes are included in this PR?

  • Support more transformation types in Transform::to_human_string
  • Change visibility of few methods to pub

Are these changes tested?

Updated existing unit test

@mnpw mnpw changed the title feat: support more types in PartitionSpec::partition_to_path feat: support more partition transformations for PartitionSpec::partition_to_path Oct 6, 2025
@mnpw
Copy link
Contributor Author

mnpw commented Oct 7, 2025

Hi @liurenjie1024, can I get a review for this

pub(crate) fn partition_to_path(&self, data: &Struct, schema: SchemaRef) -> String {
/// Returns partition path string containing partition type and partition
/// value as key-value pairs.
pub fn partition_to_path(&self, data: &Struct, schema: SchemaRef) -> String {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why we need to make this pub? It's used internally by LocationGenerator

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @liurenjie1024, this is helpful if user-code is using as iceberg-rs as a low-level library. In my particular case, I want to split my data into chunks based on the partition value, hence the need to generate partition path.

I see that PartitionKey::to_path effectively achieves the same and provides partition path.

Copy link
Contributor

@liurenjie1024 liurenjie1024 left a comment

Choose a reason for hiding this comment

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

Thanks @mnpw for pr!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support more partition transformations when creating partition path

2 participants