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


##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/utils/MetaStoreServerUtils.java:
##########
@@ -528,6 +533,7 @@ public static void updateTableStatsForCreateTable(Warehouse 
wh, Database db, Tab
         StatsSetupConst.ColumnStatsSetup statsSetup = 
StatsSetupConst.ColumnStatsSetup.parseStatsSetup(val);
         if (statsSetup.enabled) {
           try {
+            isIcebergTable = statsSetup.isIcebergTable;
             // For an Iceberg table, a new snapshot is generated, so any 
leftover files would be ignored
             // Set the column stats true in order to make it merge-able
             if (newDir || statsSetup.isIcebergTable ||

Review Comment:
   This is true when not creating Iceberg table as select.
   But when CTAS like in this 
[q-test](https://github.com/apache/hive/blob/master/iceberg/iceberg-handler/src/test/queries/positive/ctas_iceberg_partitioned_orc.q),
 it will list all the files.
   This is because when creating Iceberg table as select the table has no 
dictionary and this condition is false:
   
https://github.com/apache/hive/blob/e982ed1105062648b395c320425ea6683794f4d6/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/utils/MetaStoreServerUtils.java#L522
   `    if (tbl.isSetDictionary() && tbl.getDictionary().getValues() != null) {`
   



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

Reply via email to