deniskuzZ commented on code in PR #6292:
URL: https://github.com/apache/hive/pull/6292#discussion_r2784759057


##########
iceberg/iceberg-handler/src/test/java/org/apache/iceberg/mr/hive/TestConflictingDataFiles.java:
##########
@@ -309,4 +310,60 @@ public void testConcurrentInsertAndOverwrite() throws 
Exception {
     HiveIcebergTestUtils.validateData(expected,
         HiveIcebergTestUtils.valueForRow(schema, objects), 0);
   }
+
+  @Test
+  public void testConcurrentInsertAndCompaction() throws Exception {
+    Assume.assumeTrue(formatVersion >= 2);
+
+    Schema schema = new Schema(
+        required(1, "i", Types.IntegerType.get()),
+        required(2, "p", Types.IntegerType.get())
+    );
+
+    // create and insert an initial batch of records
+    testTables.createTable(shell, "ice_t", schema, 
PartitionSpec.unpartitioned(), fileFormat, null,
+        formatVersion, Map.of("compactor.threshold.target.size", "1500"), 
STORAGE_HANDLER_STUB);
+
+    shell.executeStatement("INSERT INTO ice_t values (1, 1), (2, 2), (3, 3)");
+    shell.executeStatement("INSERT INTO ice_t values (10, 10), (20, 20), (30, 
30), (40, 40)");
+
+    String[] sql = new String[] {
+        "INSERT INTO ice_t SELECT i*100, p*100 FROM ice_t",
+        "ALTER TABLE ice_t compact 'MAJOR' and wait"

Review Comment:
   please check above, maybe we need to execute IOW with compaction session 
attributes



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

Reply via email to