-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Spark3.1, Spark3.2, Spark3.3: Support setting current snapshot with ref #8392
Conversation
3af9e21
to
be80598
Compare
@aokolnychyi @nastra please help review. |
...sions/src/test/java/org/apache/iceberg/spark/extensions/TestSetCurrentSnapshotProcedure.java
Outdated
Show resolved
Hide resolved
Back-port of apache#8163 to `spark/v3.3`, `spark/v3.2` and `spark/v3.1`
be80598
to
7f04c3f
Compare
@nastra @amogh-jahagirdar please take another look |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR @manuzhang, I think we need to revisit the error messages being surfaced and the exception change for the case where there are missing parameters. See my comment below. If it's the case we should get a fix in for 3.4 as well.
AnalysisException.class, | ||
"Missing required parameters", | ||
IllegalArgumentException.class, | ||
"Either snapshot_id or ref must be provided, not both", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This error message doesn't seem right for the arguments that are being passed in. We're missing the required parameters right? Also I don't think we should change the exception that is being thrown for the existing cases (missing required parameters) because we probably want to preserve that behavior in case users rely on it. For the new failure case (ref + snapshot ID) the IllegalArgumentException is fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean throw AnalysisException
when both snapshot_id
and ref
are missing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aokolnychyi what do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@amogh-jahagirdar, @aokolnychyi please share your thoughts here.
Back-port of #8163 to
spark/v3.3
,spark/v3.2
andspark/v3.1