taoran92 opened a new issue, #11128: URL: https://github.com/apache/paimon/issues/11128
### Search before asking - [x] I searched in the [issues](https://github.com/apache/paimon/issues) and found nothing similar. ### Paimon version 2.2-SNAPSHOT (`3c1552ffcdde99ba9136689c6dd6d3510afb0ec4`) ### Compute Engine Spark SQL 3.5.9 ### Minimal reproduce step Using an existing Paimon catalog named `spark_test`, run the following SQL sequentially as separate statements in the same session: ```sql CREATE DATABASE spark_test.test_db; CREATE TABLE spark_test.test_db.t ( pt INT, id INT, v BIGINT ) USING paimon PARTITIONED BY (pt) TBLPROPERTIES ( 'primary-key' = 'pt,id', 'bucket' = '-1', 'write-only' = 'true', 'write.sequence-number-init-mode' = 'snapshot', 'dynamic-bucket.target-row-num' = '2', 'dynamic-bucket.assigner-parallelism' = '1' ); INSERT INTO spark_test.test_db.t VALUES (1, 1, 1), (1, 2, 2), (1, 3, 3), (1, 4, 4); INSERT INTO spark_test.test_db.t VALUES (1, 2, 20), (1, 4, 40); INSERT INTO spark_test.test_db.t VALUES (1, 3, 300); SELECT * FROM spark_test.test_db.t ORDER BY pt, id, v; ``` ### What doesn't meet your expectations? Expected: four rows, with only the latest value for each primary key. ```text pt id v 1 1 1 1 2 20 1 3 300 1 4 40 ``` Actual: five rows; primary key `(pt=1, id=3)` has both its old and updated values. ```text pt id v 1 1 1 1 2 20 1 3 3 1 3 300 1 4 40 ``` ### Anything else? This occurs on a dynamic-bucket primary-key table with `write-only=true` and `write.sequence-number-init-mode=snapshot`. ### Are you willing to submit a PR? - [x] I'm willing to submit a PR! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
