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

OpenAPI: Deprecate snapshot-id of SetStatisticsUpdate #12010

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

c-thiel
Copy link
Contributor

@c-thiel c-thiel commented Jan 20, 2025

Following the discussion on the Mailing List:
https://lists.apache.org/thread/phxjz196zbzg0fjpfkmnj0fpkshgh9z0

I would appreciate a more thorough look at the Java code changes, it's my first deprecation in iceberg and java is not my primary language.

@c-thiel c-thiel changed the title Core: Deprecate snapshot-id of SetStatisticsUpdate OpenAPI: Deprecate snapshot-id of SetStatisticsUpdate Jan 20, 2025
@@ -1146,6 +1146,10 @@ acceptedBreaks:
\ org.apache.iceberg.TableMetadata)"
justification: "Removing deprecated code"
"1.7.0":
org.apache.iceberg:iceberg-api:
Copy link
Contributor

Choose a reason for hiding this comment

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

we can't break the API. I commented in https://github.com/apache/iceberg/pull/12010/files#r1922279411 on how to avoid this, so the changes here can be removed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks @nastra - fixed in the latest commit

@@ -32,10 +32,22 @@ public SetStatistics(TableOperations ops) {
this.ops = ops;
}

/**
* Add a new schema.
Copy link
Contributor

Choose a reason for hiding this comment

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

copy/paste error?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed in latest commit

@@ -27,9 +27,21 @@ public interface UpdateStatistics extends PendingUpdate<List<StatisticsFile>> {
* the snapshot if any exists.
*
* @return this for method chaining
* @deprecated since 1.8.0, will be removed 1.9.0 or 2.0.0, use setStatistics(statisticsFile).
Copy link
Contributor

Choose a reason for hiding this comment

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

sorry I missed this during the first review, but this should be using proper javadoc: use {@link #setStatistics(StatisticsFile)}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed in latest commit

/**
* Set the statistics file for a snapshot.
*
* @deprecated since 1.8.0, will be removed in 1.9.0 or 2.0.0, use setStatistics(statisticsFile).
Copy link
Contributor

Choose a reason for hiding this comment

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

same as above: use {@link #setStatistics(StatisticsFile)}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed in latest commit

@@ -2890,6 +2889,9 @@ components:
snapshot-id:
type: integer
format: int64
description:
Copy link
Contributor

Choose a reason for hiding this comment

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

this should probably also have a deprecated: true right before this line

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed in latest commit

@c-thiel
Copy link
Contributor Author

c-thiel commented Jan 20, 2025

@nastra ready for another round.
Do we need a Vote on this in the Mailing List?

@nastra
Copy link
Contributor

nastra commented Jan 20, 2025

@nastra ready for another round. Do we need a Vote on this in the Mailing List?

Yes I think we should have a quick formal vote so that people are aware of this change

Copy link
Contributor

@kevinjqliu kevinjqliu left a comment

Choose a reason for hiding this comment

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

LGTM

* the snapshot if any exists.
*
* @return this for method chaining
*/
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: should we mention in the docstring that the snapshot id is coming from the statistics file?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I like this - added a sentence to the comment.

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.

6 participants