You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by "deniskuzZ (via GitHub)" <gi...@apache.org> on 2023/03/01 11:20:17 UTC

[GitHub] [hive] deniskuzZ commented on a diff in pull request #4088: HIVE-27013: Iceberg: Provide an option to enable iceberg manifest caching for all catalogs.

deniskuzZ commented on code in PR #4088:
URL: https://github.com/apache/hive/pull/4088#discussion_r1121552124


##########
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/Catalogs.java:
##########
@@ -243,10 +243,13 @@ static Optional<Catalog> loadCatalog(Configuration conf, String catalogName) {
    * @return complete map of catalog properties
    */
   private static Map<String, String> getCatalogProperties(Configuration conf, String catalogName, String catalogType) {
-    String keyPrefix = InputFormatConfig.CATALOG_CONFIG_PREFIX + catalogName;
     Map<String, String> catalogProperties = Streams.stream(conf.iterator())
-            .filter(e -> e.getKey().startsWith(keyPrefix))
-            .collect(Collectors.toMap(e -> e.getKey().substring(keyPrefix.length() + 1), Map.Entry::getValue));
+        .filter(e -> e.getKey().startsWith(InputFormatConfig.GLOBAL_CATALOG_CONFIG_PREFIX)).collect(

Review Comment:
   could we rewrite this to filter just in 1 iteration?



-- 
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-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org