Skip to content

Partial-update sum counts a retracted value twice when a merge starts with a retraction #1543

Backlog

Description

@JeonDaehong

With a sequence group and a sum aggregate, a merge that starts with a retraction seeds the row from the retracted record, so the retraction cancels its own payload and the old value is counted again. Committing +I(amount = 90) and then -U(90), +U(90) reads 180 instead of 90. Committing +I(40), +I(50), then -U(40), -U(50), then +U(60) reads 140 after the second commit and 200 after the third, instead of 0 and 60.

Java has the same behavior, reported in apache/paimon#11273 and being fixed in apache/paimon#11274. I'd like to port that fix here once it settles.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions