kbendick commented on a change in pull request #3428:
URL: https://github.com/apache/iceberg/pull/3428#discussion_r739887702
##########
File path: mr/src/main/java/org/apache/iceberg/mr/Catalogs.java
##########
@@ -202,7 +202,15 @@ public static boolean dropTable(Configuration conf,
Properties props) {
*/
public static boolean hiveCatalog(Configuration conf, Properties props) {
String catalogName = props.getProperty(InputFormatConfig.CATALOG_NAME);
- return
CatalogUtil.ICEBERG_CATALOG_TYPE_HIVE.equalsIgnoreCase(getCatalogType(conf,
catalogName));
+ String catalogType = getCatalogType(conf, catalogName);
+ if (catalogType != null) {
+ return
CatalogUtil.ICEBERG_CATALOG_TYPE_HIVE.equalsIgnoreCase(catalogType);
+ }
+ catalogType = getCatalogType(conf, ICEBERG_DEFAULT_CATALOG_NAME);
+ if (catalogType != null) {
+ return
CatalogUtil.ICEBERG_CATALOG_TYPE_HIVE.equalsIgnoreCase(catalogType);
+ }
+ return getCatalogProperties(conf, catalogName,
catalogType).get(CatalogProperties.CATALOG_IMPL) == null;
Review comment:
This whole block didn't cherry-pick cleanly, because we didn't grab this
PR: [Core: Throw an exception if both catalog type and catalog-impl are
set](https://github.com/apache/iceberg/pull/3162)
This is the PR from which these changes came from. It's the only PR in that
file that isn't being grabbed: https://github.com/apache/iceberg/pull/3338
--
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]