-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[fix][paimon] Fix Paimon date partition conversion failure #54043
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[fix][paimon] Fix Paimon date partition conversion failure #54043
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 |
zddr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
| .collect(Collectors.toList()); | ||
|
|
||
| for (Partition partition : paimonPartitions) { | ||
| int index = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can use
for(int i=0;i<paimonPartitions.size();i++)
instead of index
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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)