yihua commented on code in PR #14198:
URL: https://github.com/apache/hudi/pull/14198#discussion_r2524237443


##########
hudi-spark-datasource/hudi-spark/src/test/scala/org/apache/spark/sql/hudi/dml/insert/TestInsertTable2.scala:
##########
@@ -243,30 +247,32 @@ class TestInsertTable2 extends HoodieSparkSqlTestBase {
                  | partitioned by (dt)
                  | location '${tmp.getCanonicalPath}/$tableName'
          """.stripMargin)
-            spark.sql("set hoodie.datasource.write.insert.drop.duplicates = 
false")
-
-            // Enable the bulk insert
-            spark.sql("set hoodie.sql.bulk.insert.enable = true")
-            spark.sql(s"insert into $tableName values(1, 'a1', 10, 
'2021-07-18')")
-
-            assertResult(WriteOperationType.BULK_INSERT) {
-              getLastCommitMetadata(spark, 
s"${tmp.getCanonicalPath}/$tableName").getOperationType
+            withSQLConf("hoodie.datasource.write.insert.drop.duplicates" -> 
"false") {
+
+              // Enable the bulk insert
+              withSQLConf("hoodie.sql.bulk.insert.enable" -> "true") {

Review Comment:
   nit: these two lines can be merged.



##########
hudi-spark-datasource/hudi-spark/src/test/scala/org/apache/spark/sql/hudi/dml/insert/TestInsertTable3.scala:
##########
@@ -755,7 +751,7 @@ class TestInsertTable3 extends HoodieSparkSqlTestBase{
       )
       val df = spark.read.format("hudi").load(tmp.getCanonicalPath)
       assertEquals(3, 
df.select(HoodieRecord.RECORD_KEY_METADATA_FIELD).count())
-      assertResult(WriteOperationType.BULK_INSERT) {
+      assertResult(WriteOperationType.INSERT) {

Review Comment:
   Why is the write operation changed in this test?



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