Skip to content

Core: Add basic classes for writing table format-version 4 - #13123

Merged
nastra merged 2 commits into
apache:mainfrom
nastra:v4-writers
Jun 4, 2025
Merged

nastra merged 2 commits into
apache:mainfrom
nastra:v4-writers

Conversation

@nastra

@nastra nastra commented May 22, 2025

Copy link
Copy Markdown
Contributor

No description provided.

@Parameters(name = "formatVersion = {0}")
public static List<Object> parameters() {
return Arrays.asList(2, 3);
return Arrays.asList(2, 3, 4);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: Maybe we should change this to use the MAX_VERSION or all Versions parameter with a (not 1) or something

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

good point, I've updated all of those places to use MAX_VERSION and to skip v1

new Object[] {1, "testBranch"},
new Object[] {2, "main"},
new Object[] {2, "testBranch"});
return TestHelpers.ALL_VERSIONS.stream()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

❤️

@RussellSpitzer RussellSpitzer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Love this, especially fixing so many of the tests to hit all versions now programmatically. I think there are few instances still in the code we can make less manual in the upgrade so maybe we should fix those in this PR as well. I puts some comments on them.

@nastra
nastra force-pushed the v4-writers branch 2 times, most recently from c829ec0 to 5c28ed7 Compare May 23, 2025 07:21
private TestHelpers() {}

public static final int MAX_FORMAT_VERSION = 3;
public static final int MAX_FORMAT_VERSION = 4;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Since v4 spec is not there, I am not sure we should enable this in code at the moment.

What if user configures v4, what does it actually mean a v4 table?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We need this to enable v4 Dev work

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Without the Spec, why do we need to start the work?

Do you mean a POC? In that case, it can be do in a separate branch?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

we did the same with #10760 which was added right around the same time when v3 Spec work happened. Since there will be multiple efforts working on v4 stuff the v4 base classes should be added to main to make development easier for everyone

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We can add a line to the Spec.md that V3 is done and V4 is now open and experimental

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@danielcweeks Is updating SUPPORTED_TABLE_FORMAT_VERSION necessary to unblock v4 dev work?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@manuzhang yes, otherwise you won't be able to create a v4 table for testing

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Okay, but once 1.10 is released, users will be able to create v4 table even though no implementation has done, right?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yes that's correct but there just won't be any v4 features available that those users could use. Are you worried that this will lead to issues? As I mentioned in an earlier comment we already did the same thing with v3. We added the v3-specific writers first before v3 spec and implementation work landed on main

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I've talked offline with @manuzhang and he's fine with this since we already did the same thing for v3

@nastra

nastra commented Jun 4, 2025

Copy link
Copy Markdown
Contributor Author

thanks everyone for the review, I'll go ahead and merge this to unblock v4 work

@nastra
nastra merged commit b38573d into apache:main Jun 4, 2025
@nastra
nastra deleted the v4-writers branch June 4, 2025 08:49
devendra-nr pushed a commit to devendra-nr/iceberg that referenced this pull request Dec 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants