Skip to content

[Bug] Incorrect sequenceNumber in manifest after row-tracking compaction #7408

@juntaozhang

Description

@juntaozhang

Search before asking

  • I searched in the issues and found nothing similar.

Paimon version

master

Compute Engine

spark

Minimal reproduce step

  sql(
    "CREATE TABLE t (id INT, data INT) TBLPROPERTIES ('row-tracking.enabled' = 'true', 'compaction.min.file-num'='2')")

  sql("INSERT INTO t VALUES (1, 1)")
  sql("INSERT INTO t VALUES (2, 2)")
  sql("INSERT INTO t VALUES (3, 3)")

  sql("CALL sys.compact(table => 't')")


  sql("INSERT INTO t VALUES (4, '4')")
  sql("INSERT INTO t VALUES (5, '5')")
  sql("CALL sys.compact(table => 't')")

  sql("SELECT min_sequence_number, max_sequence_number FROM `t$files`").show(false)

What doesn't meet your expectations?

currently:

+-------------------+-------------------+
|min_sequence_number|max_sequence_number|
+-------------------+-------------------+
|6                  |10                 |
+-------------------+-------------------+

should be:

+-------------------+-------------------+
|min_sequence_number|max_sequence_number|
+-------------------+-------------------+
|1                  |5                 |
+-------------------+-------------------+

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

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions