You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by "aturoczy (via GitHub)" <gi...@apache.org> on 2023/05/22 07:28:36 UTC

[GitHub] [hive] aturoczy commented on a diff in pull request #4348: HIVE-27355: Iceberg: Create table can be slow due to file listing for…

aturoczy commented on code in PR #4348:
URL: https://github.com/apache/hive/pull/4348#discussion_r1200075075


##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/utils/MetaStoreServerUtils.java:
##########
@@ -546,9 +548,17 @@ public static void updateTableStatsForCreateTable(Warehouse wh, Database db, Tab
       }
     }
 
-    if (MetastoreConf.getBoolVar(conf, MetastoreConf.ConfVars.STATS_AUTO_GATHER)) {
+    boolean isIcebergTable = Optional.ofNullable(tbl.getParameters())
+            .orElse(Collections.emptyMap())
+            .getOrDefault(TABLE_TYPE_PROP, "undefined")
+            .equals(ICEBERG_TABLE_TYPE_VALUE);

Review Comment:
   Agree with @ayushtkn  I think this is not necessary call here.



##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/utils/MetaStoreServerUtils.java:
##########
@@ -511,12 +513,12 @@ public static void clearQuickStats(Map<String, String> params) {
     params.remove(StatsSetupConst.NUM_ERASURE_CODED_FILES);
   }
 
-  public static void updateTableStatsForCreateTable(Warehouse wh, Database db, Table tbl,
+  public static boolean updateTableStatsForCreateTable(Warehouse wh, Database db, Table tbl,

Review Comment:
   Maybe I don't get the context but why an update operations needs to return as a boolean? If something bad happens inside the update a dedicated exception should warn the caller, and can handle it. The return boolean is bit C++ style error management. Sometime could be OK, but I don't see the caller here. 



-- 
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