Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Core: Fix null partitions in PartitionSet #9248

Merged

Conversation

aokolnychyi
Copy link
Contributor

This PR fixes usage of null partitions in PartitionSet. Previously, it was possible to store null partitions for unpartitioned specs but we could not retrieve them back. The set returned false that was wrong.

@github-actions github-actions bot added the core label Dec 8, 2023
BY_DATA_CATEGORY_BUCKET_SPEC);

@Test
public void testGet() {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

There would be more tests in coming PRs.

@@ -274,9 +274,11 @@ public void testKeyAndEntrySetEquality() {

map1.put(BY_DATA_SPEC.specId(), Row.of("aaa"), "v1");
map1.put(BY_DATA_SPEC.specId(), Row.of("bbb"), "v2");
map1.put(UNPARTITIONED_SPEC.specId(), null, "v3");
Copy link
Contributor Author

@aokolnychyi aokolnychyi Dec 8, 2023

Choose a reason for hiding this comment

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

Our PartitionMap uses PartitionSet for keySet(). This did not work previously.

@aokolnychyi aokolnychyi force-pushed the fix-partition-set-unpartitioned-spec branch from 378e546 to 4fb7a02 Compare December 8, 2023 16:34
Copy link
Member

@RussellSpitzer RussellSpitzer left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for cleaning this up

@aokolnychyi aokolnychyi closed this Dec 8, 2023
@aokolnychyi aokolnychyi reopened this Dec 8, 2023
@aokolnychyi aokolnychyi merged commit 62a23a3 into apache:main Dec 8, 2023
84 of 90 checks passed
@aokolnychyi
Copy link
Contributor Author

Thanks, @RussellSpitzer!

lisirrx pushed a commit to lisirrx/iceberg that referenced this pull request Jan 4, 2024
devangjhabakh pushed a commit to cdouglas/iceberg that referenced this pull request Apr 22, 2024
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.

2 participants