aokolnychyi commented on code in PR #8163:
URL: https://github.com/apache/iceberg/pull/8163#discussion_r1278050930
##########
spark/v3.4/spark/src/main/java/org/apache/iceberg/spark/procedures/SetCurrentSnapshotProcedure.java:
##########
@@ -78,17 +80,21 @@ public StructType outputType() {
@Override
public InternalRow[] call(InternalRow args) {
Identifier tableIdent = toIdentifier(args.getString(0),
PARAMETERS[0].name());
- long snapshotId = args.getLong(1);
+ Long snapshotId = args.isNullAt(1) ? null : args.getLong(1);
+ String tag = args.isNullAt(2) ? null : args.getString(2);
+ Preconditions.checkArgument(
+ snapshotId != null || tag != null, "snapshot_id and tag cannot both be
null");
Review Comment:
What if both are provided?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]