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: Adds Basic Classes for Iceberg Table Version 3 #10760

Merged
merged 6 commits into from
Aug 1, 2024

Conversation

RussellSpitzer
Copy link
Member

Fixes #10747

@@ -0,0 +1,575 @@
/*
Copy link
Member Author

Choose a reason for hiding this comment

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

This is a direct copy of V2Metadata.json

Copy link
Contributor

@anuragmantri anuragmantri left a comment

Choose a reason for hiding this comment

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

Thanks @RussellSpitzer. I looked at the changes. They look good to me. Is the plan to add V3 specific changes in later PRs?

@RussellSpitzer
Copy link
Member Author

Thanks @RussellSpitzer. I looked at the changes. They look good to me. Is the plan to add V3 specific changes in later PRs?

Yes! If you check on the right, there is a link to the Project where i'm trying to collect other required changes. I wanted to make sure we had all the base classes setup so folks can start working on the specific new implementations.

@amogh-jahagirdar
Copy link
Contributor

Sorry for the delay on reviewing @RussellSpitzer I'm taking a look!

Copy link
Contributor

@amogh-jahagirdar amogh-jahagirdar left a comment

Choose a reason for hiding this comment

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

Thanks @RussellSpitzer , this looks great to me!

@@ -1574,7 +1573,7 @@ public void testPositionDeletesWithBaseTableFilterNot() {

@TestTemplate
public void testPositionDeletesResiduals() {
assumeThat(formatVersion).as("Position deletes supported only for v2 tables").isEqualTo(2);
assumeThat(formatVersion).as("Position deletes not supported by V1 Tables").isNotEqualTo(1);
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: Position deletes are not supported .. .

static class V3Writer extends ManifestWriter<DataFile> {
private final V3Metadata.IndexedManifestEntry<DataFile> entryWrapper;

V3Writer(PartitionSpec spec, EncryptedOutputFile file, Long snapshotId) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't it be a long primitive snapshotID?

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh nvm, forgot about inheritance of the snapshot ID

Comment on lines +69 to +71
case 3:
return new ManifestListWriter.V3Writer(
manifestListFile, snapshotId, parentSnapshotId, sequenceNumber);
Copy link
Contributor

Choose a reason for hiding this comment

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

Something I've been thinking about is abstracting away the different fields required for V1/V2/V3 without having to have a separate writer implementation for each. But it may not be worth it since the number of table format versions doesn't change too much and that sort of refactoring can happen down the line if it's determined to be needed (since these classes are package private, not in the public API I think there's that flexibility)

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah I was figuring for now we keep things the same as between V1 and V2, also protects us a little more from inadvertently breaking V2 as we begin mucking about with V3.

@RussellSpitzer RussellSpitzer merged commit eb9d395 into apache:main Aug 1, 2024
60 checks passed
@RussellSpitzer
Copy link
Member Author

Thanks @nastra and @amogh-jahagirdar ! Let's get to work on V3 now :)

@RussellSpitzer RussellSpitzer deleted the V3MetadataClasses branch August 1, 2024 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Create V3 Metadata Classes
4 participants