rdblue commented on a change in pull request #3162:
URL: https://github.com/apache/iceberg/pull/3162#discussion_r714176125
##########
File path: mr/src/main/java/org/apache/iceberg/mr/Catalogs.java
##########
@@ -243,15 +243,21 @@ public static boolean hiveCatalog(Configuration conf,
Properties props) {
*/
private static Map<String, String>
addCatalogPropertiesIfMissing(Configuration conf, String catalogType,
Map<String,
String> catalogProperties) {
- if (catalogType != null) {
- catalogProperties.putIfAbsent(CatalogUtil.ICEBERG_CATALOG_TYPE,
catalogType);
- }
-
String legacyCatalogImpl =
conf.get(InputFormatConfig.CATALOG_LOADER_CLASS);
if (legacyCatalogImpl != null) {
catalogProperties.putIfAbsent(CatalogProperties.CATALOG_IMPL,
legacyCatalogImpl);
}
+ if (catalogProperties.containsKey(CatalogUtil.ICEBERG_CATALOG_TYPE) &&
+ catalogProperties.containsKey(CatalogProperties.CATALOG_IMPL)) {
Review comment:
Indentation isn't correct in this file. Continuation indents should be 4
spaces.
##########
File path: mr/src/main/java/org/apache/iceberg/mr/Catalogs.java
##########
@@ -243,15 +243,21 @@ public static boolean hiveCatalog(Configuration conf,
Properties props) {
*/
private static Map<String, String>
addCatalogPropertiesIfMissing(Configuration conf, String catalogType,
Map<String,
String> catalogProperties) {
- if (catalogType != null) {
- catalogProperties.putIfAbsent(CatalogUtil.ICEBERG_CATALOG_TYPE,
catalogType);
- }
-
String legacyCatalogImpl =
conf.get(InputFormatConfig.CATALOG_LOADER_CLASS);
if (legacyCatalogImpl != null) {
catalogProperties.putIfAbsent(CatalogProperties.CATALOG_IMPL,
legacyCatalogImpl);
}
+ if (catalogProperties.containsKey(CatalogUtil.ICEBERG_CATALOG_TYPE) &&
+ catalogProperties.containsKey(CatalogProperties.CATALOG_IMPL)) {
Review comment:
Indentation isn't correct in this PR. Continuation indents should be 4
spaces.
--
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]