deniskuzZ commented on code in PR #5888: URL: https://github.com/apache/hive/pull/5888#discussion_r2164350666
########## standalone-metastore/metastore-rest-catalog/src/main/java/org/apache/iceberg/rest/HMSCatalogAdapter.java: ########## @@ -110,19 +111,18 @@ public class HMSCatalogAdapter implements RESTClient { private static final String CLIENT_ID = "client_id"; private static final String ACTOR_TOKEN = "actor_token"; private static final String SUBJECT_TOKEN = "subject_token"; - private static final String VIEWS_PATH = "v1/namespaces/{namespace}/views/{name}"; - private static final String TABLES_PATH = "v1/namespaces/{namespace}/tables/{table}"; private final Catalog catalog; private final SupportsNamespaces asNamespaceCatalog; private final ViewCatalog asViewCatalog; public HMSCatalogAdapter(Catalog catalog) { + Preconditions.checkArgument(catalog instanceof SupportsNamespaces); + Preconditions.checkArgument(catalog instanceof ViewCatalog); this.catalog = catalog; - this.asNamespaceCatalog = - catalog instanceof SupportsNamespaces ? (SupportsNamespaces) catalog : null; - this.asViewCatalog = catalog instanceof ViewCatalog ? (ViewCatalog) catalog : null; + this.asNamespaceCatalog = (SupportsNamespaces) catalog; + this.asViewCatalog = (ViewCatalog) catalog; } enum HTTPMethod { Review Comment: @okumin, could you please drop this enum and import `org.apache.iceberg.rest.HTTPRequest.HTTPMethod`? -- 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