YannByron commented on code in PR #6136:
URL: https://github.com/apache/paimon/pull/6136#discussion_r2298285528
##########
paimon-spark/paimon-spark-ut/src/test/scala/org/apache/paimon/spark/sql/MergeIntoTableTestBase.scala:
##########
@@ -135,6 +135,103 @@ abstract class MergeIntoTableTestBase extends
PaimonSparkTestBase with PaimonTab
}
}
+ test(s"Paimon MergeInto: partial insert with null") {
+ withTable("source", "target") {
+
+ Seq((1, 100, "c11"), (3, 300, "c33")).toDF("a", "b",
"c").createOrReplaceTempView("source")
+
+ createTable("target", "a INT, b INT, c STRING", Seq("a"))
+ spark.sql("INSERT INTO target values (1, 10, 'c1'), (2, 20, 'c2')")
+
+ spark.sql(s"""
+ |MERGE INTO target
+ |USING source
+ |ON target.a = source.a
+ |WHEN NOT MATCHED
+ |THEN INSERT (a) values (a)
+ |""".stripMargin)
+
+ checkAnswer(
+ spark.sql("SELECT * FROM target ORDER BY a, b"),
+ Row(1, 10, "c1") :: Row(2, 20, "c2") :: Row(3, null, null) :: Nil)
+ }
+ }
+
+ test(s"Paimon MergeInto: update + partial insert with null") {
Review Comment:
We don't have to add `update`-related tests for this pr. Remove this add
that `update + partial insert with default value` one.
--
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]