Skip to content

[Bug] Merge into paimon table from another paimon table will have ambiguous __paimon_file_path #5024

@Aitozi

Description

@Aitozi

Search before asking

  • I searched in the issues and found nothing similar.

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?

Image

Anything else?

No response

Are you willing to submit a PR?

  • I'm willing to submit a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions