You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] [Python] Bucketed append files written by PyPaimon lose append order once Java compacts the bucket #11029
Create an append table with 'bucket' = '1' and a bucket-key. Commit six one-row batches with PyPaimon (seq = 0..5), then write one more row (seq = 6) with a Java writer at default settings and read the table.
What doesn't meet your expectations?
The rows come back as [2, 0, 1, 5, 4, 3, 6] instead of [0, 1, 2, 3, 4, 5, 6]. The docs say a bucketed append table keeps append order within a partition and bucket.
PyPaimon writes every file of a bucketed append table with min_sequence_number = max_sequence_number = the bucket's restored max, so all six files have the range (1, 1). Java's AppendOnlyWriter numbers rows from the restored max + 1. Six files reach compaction.min.file-num (5 by default), so the Java write compacts the bucket. BucketedAppendCompactManager picks files from a queue ordered by minSequenceNumber, and with equal numbers that queue does not return them in append order.
Anything else?
PyPaimon alone does not compact append tables, so the order is only lost once a Java writer compacts the bucket.
Activity