0

This is my table's create script

    CREATE TABLE IF NOT EXISTS replacing_test (
        addr                String,
        ver             UInt64,
                 stt                             String,
        time                DateTime,
    ) engine=ReplacingMergeTree(ver)
    PARTITION BY toYYYYMM(time)
    PRIMARY KEY addr
    ORDER BY addr

I have 2 rows as follows:

ABC | 0 | NEW | 2020-04-17 12:39:52 
ABC | 2 | DONE | 2020-04-17 12:40:52 

When I insert 2 rows above in separate times, with the order like above, after merging, I got:

ABC | 2| DONE | 2020-04-17 12:40:52

It also my expectation.

But, when I try to insert these 2 rows at the same time by reading from backup, with random order, the result will be:

ABC | 0| DONE | 2020-04-17 12:39:52

Is there any behavior that I don't know about here?

zukito
  • 1

0 Answers0