difin commented on code in PR #4348:
URL: https://github.com/apache/hive/pull/4348#discussion_r1234286600
##########
standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/utils/TestMetaStoreServerUtils.java:
##########
@@ -293,6 +335,93 @@ public void testUpdateTableStatsSlow_doesNotUpdateStats()
throws TException {
MetaStoreServerUtils.updateTableStatsSlow(db, tbl2, wh, false, false,
null);
verify(wh, never()).getFileStatusesForUnpartitionedTable(db, tbl2);
}
+
+ /**
+ * Verify that updateTableStatsForCreateTable() does not invoke calculation
of table statistics when
+ * <ol>
+ * <li>the table is an Iceberg table</li>
+ * </ol>
+ */
+ @Test
+ public void testUpdateTableStatsForCreateTableDoesNotInvokeStatsCalc()
throws TException {
+ // Iceberg table & Iceberg stats source not defined (default is Iceberg)
=> doesn't invoke stats calculation
+ Map<String, String> params = new HashMap<>(paramsWithStats);
+ Warehouse wh = mock(Warehouse.class);
+
+ Table tbl1 = new TableBuilder()
Review Comment:
I tested it out manually. When creating an Iceberg table NOT as select, no
files' listing happens. But when creating an Iceberg table as select, it does
happens [as discussed in this
comment](https://github.com/apache/hive/pull/4348#discussion_r1227295853)
--
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]