singhpk234 commented on code in PR #1298: URL: https://github.com/apache/polaris/pull/1298#discussion_r2026293089
########## service/common/src/main/java/org/apache/polaris/service/admin/PolarisAdminService.java: ########## @@ -474,8 +474,10 @@ private void authorizeGrantOnTableLikeOperationOrThrow( if (status.getFailedToResolvePath().getLastEntityType() == PolarisEntityType.TABLE_LIKE) { if (subType == PolarisEntitySubType.ICEBERG_TABLE) { throw new NoSuchTableException("Table does not exist: %s", identifier); - } else { + } else if (subType == PolarisEntitySubType.ICEBERG_VIEW) { throw new NoSuchViewException("View does not exist: %s", identifier); + } else if (subType == PolarisEntitySubType.GENERIC_TABLE) { + throw new NoSuchViewException("Generic table does not exist: %s", identifier); Review Comment: ```suggestion throw new NoSuchTableException("Generic table does not exist: %s", identifier); ``` ########## service/common/src/main/java/org/apache/polaris/service/admin/PolarisAdminService.java: ########## @@ -474,8 +474,10 @@ private void authorizeGrantOnTableLikeOperationOrThrow( if (status.getFailedToResolvePath().getLastEntityType() == PolarisEntityType.TABLE_LIKE) { if (subType == PolarisEntitySubType.ICEBERG_TABLE) { throw new NoSuchTableException("Table does not exist: %s", identifier); - } else { + } else if (subType == PolarisEntitySubType.ICEBERG_VIEW) { throw new NoSuchViewException("View does not exist: %s", identifier); + } else if (subType == PolarisEntitySubType.GENERIC_TABLE) { Review Comment: can just put it as `else` or if there can any other value, lets throw IllegalStateException ? -- 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-unsubscr...@polaris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org