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 1d4999b
Browse filesBrowse the repository at this point in the historyBrowse files
committed
[fix](paimon) Keep static overwrite values on the partition the rows are written to
### What problem does this PR solve?
Issue Number: None
Related PR: #65868, #68532
Problem Summary: The static overwrite value of a Paimon partition could still
name a partition other than the one the rows are written to.
A string written into a shorter CHAR / VARCHAR column is not cast by BindSink:
under the default non-strict session it is cut to the column length in code
points. The static value was cast instead, which rejects a CHAR value that is
too long (PARTITION (p = 'abcd') on CHAR(2) failed even for an INSERT, whose
rows hold 'ab') and cuts UTF-16 units, splitting a surrogate pair that Paimon
then encodes as '?'. The static value of a string column now follows the same
rule as the row.
A TIMESTAMP WITH LOCAL TIME ZONE value moves from the session zone to the FE
JVM zone, where Paimon parses it. A session-local time skipped by a DST change
is moved past the gap by Java, while the BE writes the rows at the instant of
the change (cctz), and an instant whose local time the JVM zone repeats formats
to a value that Paimon reads as the earlier instant. An empty overwrite then
replaced an unrelated partition. An overwrite now rejects both, the second as
branch-4.x #68532 does.
### Release note
None
### Check List (For Author)
- Test: Unit Test
- PluginDrivenTableSinkBindingTest: CHAR, VARCHAR and STRING values are cut
in code points like the rows, and kept as written when the session does
not truncate.
- PaimonWriteBindingTest: an overwrite rejects both instants of a JVM-zone
overlap and a session time inside a DST gap; an INSERT keeps them;
instants outside an overlap round-trip through Paimon's parser.
- Behavior changed: Yes. A static overwrite of an LTZ partition value in a DST
gap of the session zone, or in a DST overlap of the FE JVM zone, is rejected.
- Does this need documentation: No
Co-authored-by: Socrates <[email protected]>
Co-authored-by: Gabriel <[email protected]>
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
+73Lines changed: 73 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -39,6 +39,7 @@
39
39
40
40
importjava.nio.file.Path;
41
41
importjava.time.Instant;
42
+
importjava.time.OffsetDateTime;
42
43
importjava.util.Arrays;
43
44
importjava.util.Collections;
44
45
importjava.util.List;
@@ -138,6 +139,71 @@ public void staticTimestampTzPartitionMovesTheInstantToTheSdkZone(@TempDir Path
Copy file name to clipboardExpand all lines: fe/fe-connector/fe-connector-spi/src/main/java/org/apache/doris/connector/spi/handle/ConnectorWriteHandle.java
Copy file name to clipboardExpand all lines: fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/insert/PluginDrivenInsertCommandContext.java
0 commit comments