hudi-agent commented on code in PR #20121:
URL: https://github.com/apache/hudi/pull/20121#discussion_r4127087054


##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/hudi/HoodieSparkSqlWriter.scala:
##########
@@ -270,7 +270,15 @@ class HoodieSparkSqlWriterInternal {
       (false, common.util.Option.empty(), common.util.Option.empty(), 
common.util.Option.empty(), hoodieWriteClient.orNull, tableConfig)
     } else {
       // Handle various save modes
-      handleSaveModes(sparkSession, mode, basePath, tableConfig, tblName, 
operation, fs)
+      val saveModeOperation =
+        if (operation == WriteOperationType.BULK_INSERT

Review Comment:
   🤖 This check doesn't look at `ENABLE_ROW_WRITER`, but only `bulkInsertAsRow` 
reads `BULKINSERT_OVERWRITE_OPERATION_TYPE`. With 
`hoodie.datasource.write.row.writer.enable=false`, the table is now kept and 
the RDD bulk_insert just appends, so the old rows survive the overwrite. Could 
you also require `hoodieConfig.getBoolean(ENABLE_ROW_WRITER)` here, and maybe 
add a test with the row writer off?
   
   <sub><i>⚠️ AI-generated; verify before applying. React 👍/👎 to flag 
quality.</i></sub>



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