[fix][paimon] Fix Paimon date partition conversion failure#54043
[fix][paimon] Fix Paimon date partition conversion failure#54043morningman merged 5 commits intoapache:masterfrom
Conversation
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
|
run buildall |
|
@zddr PTAL |
TPC-H: Total hot run time: 34370 ms |
TPC-DS: Total hot run time: 174767 ms |
ClickBench: Total hot run time: 33.24 s |
FE UT Coverage ReportIncrement line coverage |
|
run nonConcurrent |
| .collect(Collectors.toList()); | ||
|
|
||
| for (Partition partition : paimonPartitions) { | ||
| int index = 0; |
There was a problem hiding this comment.
can use
for(int i=0;i<paimonPartitions.size();i++)
instead of index
There was a problem hiding this comment.
After careful consideration, a better approach would be to create a name-to-type mapping from partitionColumns, then look up the type directly by column name when iterating through partition.spec(). This eliminates the dependency on index-based matching and makes the code more robust.
|
PR approved by anyone and no changes requested. |
|
run buildall |
TPC-H: Total hot run time: 33951 ms |
TPC-DS: Total hot run time: 161969 ms |
ClickBench: Total hot run time: 32.45 s |
FE UT Coverage ReportIncrement line coverage |
|
PR approved by at least one committer and no changes requested. |
|
run cloud_p0 |
### What problem does this PR solve? **Background**: PR [#46641](#46641) worked around Paimon date partition failures by treating date partitions as unpartitioned tables. **Root Cause**: Paimon stores date partition values as integers (e.g., `20231225` for `2023-12-25`), but the previous implementation failed to convert these to Doris-compatible date formats, resulting in: ``` org.apache.doris.common.AnalysisException: errCode = 2, detailMessage = date literal [19737] is invalid: null ```
What problem does this PR solve?
Background: PR #46641 worked around Paimon date partition failures by treating date partitions as unpartitioned tables.
Root Cause: Paimon stores date partition values as integers (e.g.,
20231225for2023-12-25), but the previous implementation failed to convert these to Doris-compatible date formats, resulting in:Issue Number: close #xxx
Related PR: #xxx
Problem Summary:
Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)