Search before asking
Paimon version
1.0
Compute Engine
Spark
Minimal reproduce step
test(s"Paimon MergeInto: two paimon table") {
withTable("source", "target") {
createTable("target", "a INT, b INT, c STRING", Seq("a"))
createTable("source", "a INT, b INT, c STRING", Seq("a"))
spark.sql("INSERT INTO source values (1, 100, 'c11'), (3, 300, 'c33')")
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 MATCHED THEN
|UPDATE SET a = source.a, b = source.b, c = source.c
|""".stripMargin)
checkAnswer(
spark.sql("SELECT * FROM target ORDER BY a, b"),
Row(1, 100, "c11") :: Row(2, 20, "c2") :: Nil)
}
What doesn't meet your expectations?
Anything else?
No response
Are you willing to submit a PR?
Search before asking
Paimon version
1.0
Compute Engine
Spark
Minimal reproduce step
What doesn't meet your expectations?
Anything else?
No response
Are you willing to submit a PR?