Davis-Zhang-Onehouse commented on code in PR #12583:
URL: https://github.com/apache/hudi/pull/12583#discussion_r1914211489


##########
hudi-spark-datasource/hudi-spark/src/test/scala/org/apache/spark/sql/hudi/dml/TestMergeIntoTable.scala:
##########
@@ -1336,44 +1339,59 @@ class TestMergeIntoTable extends HoodieSparkSqlTestBase 
with ScalaAssertionSuppo
 
   test("Test MergeInto with partial insert") {
     spark.sql(s"set ${MERGE_SMALL_FILE_GROUP_CANDIDATES_LIMIT.key} = 0")
-    Seq(true, false).foreach { sparkSqlOptimizedWrites =>
+
+    // Test combinations: (tableType, sparkSqlOptimizedWrites)
+    val testConfigs = Seq(
+      ("mor", true),
+      ("mor", false),
+      ("cow", true),
+      ("cow", false)
+    )
+
+    testConfigs.foreach { case (tableType, sparkSqlOptimizedWrites) =>
+      log.info(s"=== Testing MergeInto with partial insert: 
tableType=$tableType, sparkSqlOptimizedWrites=$sparkSqlOptimizedWrites ===")
       withRecordType()(withTempDir { tmp =>
         spark.sql("set hoodie.payload.combined.schema.validate = true")
-        // Create a partitioned mor table
+        // Create a partitioned table
         val tableName = generateTableName
         spark.sql(
           s"""
              | create table $tableName (
              |  id bigint,
              |  name string,
              |  price double,
+             |  ts bigint,
              |  dt string
              | ) using hudi
              | tblproperties (
-             |  type = 'mor',
-             |  primaryKey = 'id'
+             |  type = '$tableType',
+             |  primaryKey = 'id',
+             |  precombineKey = 'ts'

Review Comment:
   follow ups:
   - So even if I set precombine field it does not address 8835.
   - To unblock this PR, I make the test a separate one and only keep test 
dimensions for COW as it does not hit 8835.  Once that is fixed, we can 
uncomment the MOR dimensions



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