RussellSpitzer commented on a change in pull request #1906: URL: https://github.com/apache/iceberg/pull/1906#discussion_r540532737
########## File path: spark3/src/main/java/org/apache/iceberg/spark/procedures/BaseProcedure.java ########## @@ -70,21 +82,22 @@ protected BaseProcedure(TableCatalog tableCatalog) { } protected Identifier toIdentifier(String identifierAsString, String argName) { - Preconditions.checkArgument(identifierAsString != null && !identifierAsString.isEmpty(), - "Cannot handle an empty identifier for argument %s", argName); - - CatalogAndIdentifier catalogAndIdentifier = Spark3Util.catalogAndIdentifier( - "identifier for arg " + argName, spark, identifierAsString, tableCatalog); - - CatalogPlugin catalog = catalogAndIdentifier.catalog(); - Identifier identifier = catalogAndIdentifier.identifier(); + CatalogAndIdentifier catalogAndIdentifier = toCatalogAndIdentifer(identifierAsString, argName, tableCatalog); Preconditions.checkArgument( - catalog.equals(tableCatalog), + catalogAndIdentifier.catalog().equals(tableCatalog), "Cannot run procedure in catalog '%s': '%s' is a table in catalog '%s'", - tableCatalog.name(), identifierAsString, catalog.name()); + tableCatalog.name(), identifierAsString, catalogAndIdentifier.catalog().name()); + + return catalogAndIdentifier.identifier(); + } + + protected CatalogAndIdentifier toCatalogAndIdentifer(String identifierAsString, String argName, Review comment: ah yeah, let me fix that ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org