wForget commented on code in PR #2828:
URL: https://github.com/apache/datafusion-comet/pull/2828#discussion_r2579238680


##########
spark/src/main/scala/org/apache/comet/serde/operator/CometDataWritingCommand.scala:
##########
@@ -163,7 +166,29 @@ object CometDataWritingCommand extends 
CometOperatorSerde[DataWritingCommandExec
         other
     }
 
-    CometNativeWriteExec(nativeOp, childPlan, outputPath)
+    // Create FileCommitProtocol for atomic writes
+    val jobId = java.util.UUID.randomUUID().toString
+    val committer =
+      try {
+        // Use Spark's SQLHadoopMapReduceCommitProtocol
+        val committerClass =
+          
classOf[org.apache.spark.sql.execution.datasources.SQLHadoopMapReduceCommitProtocol]

Review Comment:
   The commit protocol class is configurable in spark. We should add a fallback 
when the configuration is not `SQLHadoopMapReduceCommitProtocol`.
   
   
https://github.com/apache/spark/blob/4435a3a7f0883559de3bd13ba84f311200943622/sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala#L2194-L2203



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