difin commented on code in PR #4348:
URL: https://github.com/apache/hive/pull/4348#discussion_r1227335107
##########
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:
Hi @ayushtkn, @aturoczy,
I reverted to using previous version of checking if the table is iceberg
using table type property instead of using statsSetup.isIcebergTable, because I
found it didn't work for Iceberg table created as select.
statsSetup is retrieved from table's dictionary, but when creating iceberg
table as select, the table has no dictionary and this condition is false, so it
is not reliable way to check if table is iceberg for CTAS table:
https://github.com/apache/hive/blob/e982ed1105062648b395c320425ea6683794f4d6/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/utils/MetaStoreServerUtils.java#L522
--
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]