deniskuzZ commented on code in PR #5722:
URL: https://github.com/apache/hive/pull/5722#discussion_r2020848012
##########
iceberg/iceberg-handler/src/test/java/org/apache/iceberg/mr/hive/TestHiveIcebergStatistics.java:
##########
@@ -130,6 +130,28 @@ public void testStatsWithInsert() {
checkColStatMinMaxValue(identifier.name(), "customer_id", 0, 5);
}
+ @Test
+ public void testStatsWithPessimisticLockInsert() {
+ TableIdentifier identifier = TableIdentifier.of("default", "customers");
+
+ shell.setHiveSessionValue(HiveConf.ConfVars.HIVE_STATS_AUTOGATHER.varname,
true);
+
shell.setHiveSessionValue(HiveConf.ConfVars.HIVE_TXN_EXT_LOCKING_ENABLED.varname,
true);
+ testTables.createTable(shell, identifier.name(),
HiveIcebergStorageHandlerTestUtils.CUSTOMER_SCHEMA,
+ PartitionSpec.unpartitioned(), fileFormat, ImmutableList.of(), 1,
+ ImmutableMap.of(TableProperties.HIVE_LOCK_ENABLED, "false"));
+
+ if (testTableType != TestTables.TestTableType.HIVE_CATALOG) {
+ // If the location is set and we have to gather stats, then we have to
update the table stats now
+ shell.executeStatement("ANALYZE TABLE " + identifier + " COMPUTE
STATISTICS FOR COLUMNS");
Review Comment:
why do you need this? just test the `HiveCatalog`
--
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]