jackye1995 commented on a change in pull request #2565:
URL: https://github.com/apache/iceberg/pull/2565#discussion_r633151118
##########
File path: mr/src/main/java/org/apache/iceberg/mr/InputFormatConfig.java
##########
@@ -203,6 +202,44 @@ public static Schema readSchema(Configuration conf) {
return readColumns != null && readColumns.length > 0 ? readColumns : null;
}
+ /**
+ * Get Hadoop config key of catalog type based on catalog name and {@link
#CATALOG_TYPE_TEMPLATE}
+ * @param catalogName catalog name
+ * @return Hadoop config key of catalog type for the catalog name
+ */
+ public static String catalogTypeConfigKey(String catalogName) {
+ return String.format(InputFormatConfig.CATALOG_TYPE_TEMPLATE, catalogName);
Review comment:
In addition, I am treating `CatalogUtil.ICEBERG_CATALOG_TYPE` as the
catalog property to use, and removed reference to
`InputFormatConfig.CATALOG_TYPE_TEMPLATE`. I also added documentation inside
`CatalogUtil` to make things clear.
I don't personally like the fact that `CatalogUtil.ICEBERG_CATALOG_TYPE` is
in `CatalogUtil` instead of `CatalogProperties`, but we already released it in
0.11 as public variables so I decide to just keep it this way.
--
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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]