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
Commit 45e6e5d
Browse filesBrowse the repository at this point in the historyBrowse files
[fix](paimon) Reject padding a short CHAR key that MERGE inserts
MERGE matches its source rows to a Paimon table, and checks the keys it
inserts for duplicates, by the key as Doris holds it: Doris compares
CHAR values unpadded, so 'k' and 'k ' are two keys and neither matches a
stored 'k '. The writer padded the keys of the rows MERGE inserts
afterwards. On a local cluster, a NOT MATCHED MERGE of 'k' and 'k ' into
an empty CHAR(3)-keyed table committed one row, and a NOT MATCHED-only
MERGE of 'k' replaced the stored row 'k ' that it had not matched. The
writer now fails such a row when a CHAR primary-key value is shorter
than the column, the only case in which padding changes a key, and the
message says to pad the key in the MERGE with rpad or to turn padding
off. A full-length key is written as it is.
The static partition value of the table's rowkind.field is no longer
padded either, as the writer already leaves the rows' value alone: with
a CHAR rowkind.field partition column, a nonempty static overwrite of
'+I' failed with "does not belong to this partition", and an empty one
returned OK without clearing the partition.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Copy file name to clipboardExpand all lines: fe/fe-connector/fe-connector-paimon/src/main/java/org/apache/doris/connector/paimon/PaimonWriteBinding.java
Copy file name to clipboardExpand all lines: fe/fe-connector/fe-connector-paimon/src/test/java/org/apache/doris/connector/paimon/PaimonWriteBindingTest.java
+24Lines changed: 24 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -44,6 +44,7 @@
44
44
importjava.time.OffsetDateTime;
45
45
importjava.util.Arrays;
46
46
importjava.util.Collections;
47
+
importjava.util.LinkedHashMap;
47
48
importjava.util.List;
48
49
importjava.util.Map;
49
50
importjava.util.Set;
@@ -253,6 +254,29 @@ public void staticCharPartitionIsPaddedAsTheRowsAre(@TempDir Path warehouse) {
0 commit comments