You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "manuzhang (via GitHub)" <gi...@apache.org> on 2023/08/25 02:23:54 UTC
[GitHub] [iceberg] manuzhang opened a new pull request, #8392: Spark3.1, Spark3.2, Spark3.3: Support setting current snapshot with ref
manuzhang opened a new pull request, #8392:
URL: https://github.com/apache/iceberg/pull/8392
Back-port of https://github.com/apache/iceberg/pull/8163 to `spark/v3.3`, `spark/v3.2` and `spark/v3.1`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
[GitHub] [iceberg] manuzhang commented on pull request #8392: Spark3.1, Spark3.2, Spark3.3: Support setting current snapshot with ref
Posted by "manuzhang (via GitHub)" <gi...@apache.org>.
manuzhang commented on PR #8392:
URL: https://github.com/apache/iceberg/pull/8392#issuecomment-1698501414
@nastra @amogh-jahagirdar please take another look
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
[GitHub] [iceberg] nastra commented on a diff in pull request #8392: Spark3.1, Spark3.2, Spark3.3: Support setting current snapshot with ref
Posted by "nastra (via GitHub)" <gi...@apache.org>.
nastra commented on code in PR #8392:
URL: https://github.com/apache/iceberg/pull/8392#discussion_r1305753185
##########
spark/v3.1/spark-extensions/src/test/java/org/apache/iceberg/spark/extensions/TestSetCurrentSnapshotProcedure.java:
##########
@@ -252,5 +252,60 @@ public void testInvalidRollbackToSnapshotCases() {
IllegalArgumentException.class,
"Cannot handle an empty identifier",
() -> sql("CALL %s.system.set_current_snapshot('', 1L)", catalogName));
+
+ AssertHelpers.assertThrows(
Review Comment:
we don't want to introduce more usages of `AssertHelpers`, so better to use `Assertions.assertThatThrownBy` here
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
[GitHub] [iceberg] manuzhang commented on a diff in pull request #8392: Spark3.1, Spark3.2, Spark3.3: Support setting current snapshot with ref
Posted by "manuzhang (via GitHub)" <gi...@apache.org>.
manuzhang commented on code in PR #8392:
URL: https://github.com/apache/iceberg/pull/8392#discussion_r1314889968
##########
spark/v3.1/spark-extensions/src/test/java/org/apache/iceberg/spark/extensions/TestSetCurrentSnapshotProcedure.java:
##########
@@ -219,14 +220,14 @@ public void testInvalidRollbackToSnapshotCases() {
AssertHelpers.assertThrows(
"Should reject calls without all required args",
- AnalysisException.class,
- "Missing required parameters",
+ IllegalArgumentException.class,
+ "Either snapshot_id or ref must be provided, not both",
Review Comment:
@aokolnychyi what do you think?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] Spark3.1, Spark3.2, Spark3.3: Support setting current snapshot with ref [iceberg]
Posted by "manuzhang (via GitHub)" <gi...@apache.org>.
manuzhang closed pull request #8392: Spark3.1, Spark3.2, Spark3.3: Support setting current snapshot with ref
URL: https://github.com/apache/iceberg/pull/8392
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
[GitHub] [iceberg] amogh-jahagirdar commented on a diff in pull request #8392: Spark3.1, Spark3.2, Spark3.3: Support setting current snapshot with ref
Posted by "amogh-jahagirdar (via GitHub)" <gi...@apache.org>.
amogh-jahagirdar commented on code in PR #8392:
URL: https://github.com/apache/iceberg/pull/8392#discussion_r1312435019
##########
spark/v3.1/spark-extensions/src/test/java/org/apache/iceberg/spark/extensions/TestSetCurrentSnapshotProcedure.java:
##########
@@ -219,14 +220,14 @@ public void testInvalidRollbackToSnapshotCases() {
AssertHelpers.assertThrows(
"Should reject calls without all required args",
- AnalysisException.class,
- "Missing required parameters",
+ IllegalArgumentException.class,
+ "Either snapshot_id or ref must be provided, not both",
Review Comment:
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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
[GitHub] [iceberg] manuzhang commented on a diff in pull request #8392: Spark3.1, Spark3.2, Spark3.3: Support setting current snapshot with ref
Posted by "manuzhang (via GitHub)" <gi...@apache.org>.
manuzhang commented on code in PR #8392:
URL: https://github.com/apache/iceberg/pull/8392#discussion_r1314473231
##########
spark/v3.1/spark-extensions/src/test/java/org/apache/iceberg/spark/extensions/TestSetCurrentSnapshotProcedure.java:
##########
@@ -219,14 +220,14 @@ public void testInvalidRollbackToSnapshotCases() {
AssertHelpers.assertThrows(
"Should reject calls without all required args",
- AnalysisException.class,
- "Missing required parameters",
+ IllegalArgumentException.class,
+ "Either snapshot_id or ref must be provided, not both",
Review Comment:
Do you mean throw `AnalysisException` when both `snapshot_id` and `ref` are missing?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
[GitHub] [iceberg] manuzhang commented on pull request #8392: Spark3.1, Spark3.2, Spark3.3: Support setting current snapshot with ref
Posted by "manuzhang (via GitHub)" <gi...@apache.org>.
manuzhang commented on PR #8392:
URL: https://github.com/apache/iceberg/pull/8392#issuecomment-1693173402
@aokolnychyi @nastra please help review.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
[GitHub] [iceberg] manuzhang commented on a diff in pull request #8392: Spark3.1, Spark3.2, Spark3.3: Support setting current snapshot with ref
Posted by "manuzhang (via GitHub)" <gi...@apache.org>.
manuzhang commented on code in PR #8392:
URL: https://github.com/apache/iceberg/pull/8392#discussion_r1325472406
##########
spark/v3.1/spark-extensions/src/test/java/org/apache/iceberg/spark/extensions/TestSetCurrentSnapshotProcedure.java:
##########
@@ -219,14 +220,14 @@ public void testInvalidRollbackToSnapshotCases() {
AssertHelpers.assertThrows(
"Should reject calls without all required args",
- AnalysisException.class,
- "Missing required parameters",
+ IllegalArgumentException.class,
+ "Either snapshot_id or ref must be provided, not both",
Review Comment:
@amogh-jahagirdar, @aokolnychyi please share your thoughts here.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org