akshat0395 commented on code in PR #5404: URL: https://github.com/apache/hive/pull/5404#discussion_r1758648341
########## iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergStorageHandler.java: ########## @@ -1011,10 +1011,13 @@ public void alterTableSnapshotRefOperation(org.apache.hadoop.hive.ql.metadata.Ta IcebergSnapshotRefExec.createBranch(icebergTable, createBranchSpec); break; case CREATE_TAG: - Optional.ofNullable(icebergTable.currentSnapshot()).orElseThrow(() -> new UnsupportedOperationException( - String.format("Cannot alter %s on iceberg table %s.%s which has no snapshot", - alterTableSnapshotRefSpec.getOperationType().getName(), hmsTable.getDbName(), - hmsTable.getTableName()))); + // https://errorprone.info/bugpattern/ReturnValueIgnored + if (!Optional.ofNullable(icebergTable.currentSnapshot()).isPresent()) { Review Comment: Thanks @Aggarwal-Raghav for addressing this, I have updated this as part of https://github.com/apache/hive/pull/5404/commits/2ceea5d485e42290fea0acd8f4b8cf230d307c84 -- 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: gitbox-unsubscr...@hive.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For additional commands, e-mail: gitbox-h...@hive.apache.org