Skip to content

Conversation

@ajantha-bhat
Copy link
Member

@ajantha-bhat ajantha-bhat commented Mar 17, 2025

Replaced Enum with Nested field because Iceberg follows this pattern in other files (Example: DataFile.java)

More info: #11216 (comment)

return id;
}
}
public static final int PARTITION_FIELD_ID = 0;
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this starting with 0? In the previous code the id was started with 1

Copy link
Member Author

Choose a reason for hiding this comment

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

PartitionStats.set(pos, value) was based on enum ordinal before (starts from zero).

Now that we don't have ordinal, I have used field_id instead as field_id-1 may look odd.
I even thought of updating the PartitionStats.set(pos, value) to set from 1, but all of the places Structlike starts from 0. So, didn't went with that path.

Copy link
Member Author

Choose a reason for hiding this comment

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

Also, since it is an unreleased feature, modifying this won't cause compatibility issues.

@pvary
Copy link
Contributor

pvary commented Mar 19, 2025

Let's wait a bit for @aokolnychyi, and if he has not time to review, then we can merge this.

@ajantha-bhat ajantha-bhat added this to the Iceberg 1.9.0 milestone Mar 19, 2025
@ajantha-bhat ajantha-bhat requested a review from nastra March 24, 2025 11:46
@ajantha-bhat
Copy link
Member Author

@nastra: Can you please take a look?

@nastra nastra merged commit 62005e7 into apache:main Mar 24, 2025
42 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants