deniskuzZ commented on code in PR #5498: URL: https://github.com/apache/hive/pull/5498#discussion_r1810561575
########## iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergStorageHandler.java: ########## @@ -471,6 +483,22 @@ public Map<String, String> getBasicStatistics(Partish partish) { Map<String, String> summary = table.currentSnapshot().summary(); if (summary != null) { + if (Boolean.parseBoolean(summary.get(SnapshotSummary.PARTITION_SUMMARY_PROP)) && + partish.getPartition() != null) { + String key = SnapshotSummary.CHANGED_PARTITION_PREFIX + partish.getPartition().getName(); + Map<String, String> map = Maps.newHashMap(); + + if (summary.containsKey(key)) { + StringTokenizer tokenizer = new StringTokenizer(summary.get(key), ","); + while (tokenizer.hasMoreTokens()) { + String token = tokenizer.nextToken(); + String[] keyValue = token.split("="); + map.put(keyValue[0], keyValue[1]); + } + } + summary = map; Review Comment: done ########## iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/IcebergTableUtil.java: ########## @@ -129,19 +129,19 @@ public static Table getTable(Configuration configuration, org.apache.hadoop.hive */ static Table getTable(Configuration configuration, Properties properties, boolean skipCache) { String metaTable = properties.getProperty(IcebergAcidUtil.META_TABLE_PROPERTY); - String tableName = properties.getProperty(Catalogs.NAME); - String location = properties.getProperty(Catalogs.LOCATION); + Properties props = (metaTable != null) ? new Properties() : properties; + if (metaTable != null) { + props.computeIfAbsent(InputFormatConfig.CATALOG_NAME, properties::get); // HiveCatalog, HadoopCatalog uses NAME to identify the metadata table - properties.setProperty(Catalogs.NAME, tableName + "." + metaTable); + props.computeIfAbsent(Catalogs.NAME, k -> properties.get(k) + "." + metaTable); // HadoopTable uses LOCATION to identify the metadata table - properties.setProperty(Catalogs.LOCATION, location + "#" + metaTable); + props.computeIfAbsent(Catalogs.LOCATION, k -> properties.get(k) + "#" + metaTable); } Review Comment: done -- 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-unsubscr...@hive.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For additional commands, e-mail: gitbox-h...@hive.apache.org