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


##########
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/Catalogs.java:
##########
@@ -254,47 +251,21 @@ static Optional<Catalog> loadCatalog(Configuration conf, 
String catalogName) {
    * @param catalogType type of the catalog
    * @return complete map of catalog properties
    */
-  private static Map<String, String> getCatalogProperties(Configuration conf, 
String catalogName, String catalogType) {
+  private static Map<String, String> getCatalogProperties(
+      Configuration conf, String catalogName, String catalogType) {
     Map<String, String> catalogProperties = Maps.newHashMap();
     conf.forEach(config -> {
       if 
(config.getKey().startsWith(InputFormatConfig.CATALOG_DEFAULT_CONFIG_PREFIX)) {
         catalogProperties.putIfAbsent(
-            
config.getKey().substring(InputFormatConfig.CATALOG_DEFAULT_CONFIG_PREFIX.length()),
-            config.getValue());
+                
config.getKey().substring(InputFormatConfig.CATALOG_DEFAULT_CONFIG_PREFIX.length()),
+                config.getValue());
       } else if 
(config.getKey().startsWith(InputFormatConfig.CATALOG_CONFIG_PREFIX + 
catalogName)) {

Review Comment:
   could we please extract `String keyPrefix = 
InputFormatConfig.CATALOG_CONFIG_PREFIX + catalogName;` so we won't generate 
new String objects on each 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: [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]

Reply via email to