voonhous commented on code in PR #19791:
URL: https://github.com/apache/hudi/pull/19791#discussion_r3886679810


##########
hudi-flink-datasource/hudi-flink/src/test/java/org/apache/hudi/sink/ITTestDataStreamV2Write.java:
##########
@@ -100,6 +107,34 @@ public void testAppendWrite() throws Exception {
     writeAndCheckExpected(conf, "append_write", 1);
   }
 
+  @ParameterizedTest

Review Comment:
   Verified at 7c36e9ba: test removed; `hoodieStreamWrite` is the guarded 
funnel and `TestOptionsResolver` pins the predicate. Resolving.



##########
hudi-spark-datasource/hudi-spark/src/test/scala/org/apache/spark/sql/hudi/dml/insert/TestInsertTable5.scala:
##########
@@ -358,4 +358,80 @@ class TestInsertTable5 extends HoodieSparkSqlTestBase {
       }
     }
   }
+
+  test("Test Insert Overwrite With Non Blocking Concurrency Control Is 
Rejected") {
+    Seq("INSERT_OVERWRITE", "INSERT_OVERWRITE_TABLE").foreach { operation =>
+      withSQLConf(
+        "hoodie.write.concurrency.mode" -> "NON_BLOCKING_CONCURRENCY_CONTROL",
+        "hoodie.datasource.write.operation"  -> operation
+      ) {
+        withTempDir { tmp =>
+          withTable(generateTableName) { tableName =>
+            val tablePath = s"""${tmp.getCanonicalPath}/$tableName"""
+            spark.sql(
+              s"""
+                 |create table $tableName (
+                 |  id int,
+                 |  name string,
+                 |  price double,
+                 |  ts long
+                 |) using hudi
+                 | tblproperties (
+                 |   primaryKey = 'id',
+                 |   type = 'mor',
+                 |   preCombineField = 'ts',
+                 |   hoodie.index.type = 'BUCKET',
+                 |   hoodie.index.bucket.engine = 'SIMPLE',
+                 |   hoodie.bucket.index.hash.field = 'id',
+                 |   hoodie.bucket.index.num.buckets = 1)
+                 | location '${tablePath}'
+                 | """.stripMargin)
+
+            checkExceptionContain(
+              s"""insert into $tableName values
+                 | (1, 'a1', 10, 1000)
+                 | """.stripMargin)(
+              "Insert overwrite is not supported with non-blocking concurrency 
control")
+          }
+        }
+      }
+    }
+  }
+
+  test("Test Insert Overwrite (bulk_insert mode) With Non Blocking Concurrency 
Control Is Rejected") {
+    withSQLConf(
+      "hoodie.write.concurrency.mode" -> "NON_BLOCKING_CONCURRENCY_CONTROL",
+      "hoodie.datasource.write.operation"  -> "BULK_INSERT"
+    ) {
+      withTempDir { tmp =>
+        withTable(generateTableName) { tableName =>
+          val tablePath = s"""${tmp.getCanonicalPath}/$tableName"""
+          spark.sql(
+            s"""
+               |create table $tableName (

Review Comment:
   Verified at 7c36e9ba: one test in `TestInsertTable3`, single DDL, 
`TestInsertTable5` back to master. Resolving.



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

Reply via email to