Shekharrajak commented on code in PR #3530:
URL: https://github.com/apache/datafusion-comet/pull/3530#discussion_r2942165846
##########
spark/src/test/scala/org/apache/comet/parquet/CometParquetWriterSuite.scala:
##########
@@ -140,6 +140,39 @@ class CometParquetWriterSuite extends CometTestBase {
}
}
+ // Test for issue #3430: SPARK-48817 multi-insert with native writer in
Spark 4.x
+ test("parquet write with multi-insert pattern") {
+ withTempPath { dir =>
+ val output1 = new File(dir, "output1.parquet").getAbsolutePath
+ val output2 = new File(dir, "output2.parquet").getAbsolutePath
+
+ withSQLConf(
+ CometConf.COMET_NATIVE_PARQUET_WRITE_ENABLED.key -> "true",
+
CometConf.getOperatorAllowIncompatConfigKey(classOf[DataWritingCommandExec]) ->
"true",
+ CometConf.COMET_EXEC_ENABLED.key -> "true") {
+
+ // Create source data with repartition (simulating SPARK-48817 test
pattern)
+ val sourceData = spark.range(1, 10).toDF("id").repartition(3)
+
+ // Write to first output
+ val plan1 = captureWritePlan(path => sourceData.write.parquet(path),
output1)
+
+ // Write to second output (simulating multi-insert reuse pattern)
Review Comment:
added sql test
https://github.com/apache/datafusion-comet/pull/3530/changes#diff-f982117d48cbd3ea63b39340a04b85ad436b5e6782390ab5234c28455e2d69deR163
--
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]