branch-3.1: [fix](paimon)Handle oversized CHAR/VARCHAR fields in Paimon to Doris type mapping #55051#55531
Merged
morrySnow merged 3 commits intoapache:branch-3.1from Sep 4, 2025
Conversation
added 2 commits
September 1, 2025 15:26
…type mapping (apache#55051) ### What problem does this PR solve? In PR apache#49623, we implemented conversion from Paimon `VARCHAR/CHAR` types to Doris `VARCHAR/CHAR` types. However, there are significant differences in the maximum length constraints between these systems: **Apache Paimon:** - `CHAR` : Fixed-length character string declared using CHAR(n) where n is the number of code points. n must have a value between `1` and `2,147,483,647` (inclusive). Defaults to n=1 if no length is specified. - `VARCHAR`: Variable-length character string declared using VARCHAR(n) where n is the maximum number of code points. n must have a value between `1` and `2,147,483,647` (inclusive). Defaults to n=1 if no length is specified. **Apache Doris:** - `CHAR `: Maximum length is `255` characters - `VARCHAR` : Maximum length is `65,533` characters **Solution:** This PR addresses the length constraint mismatch by automatically converting oversized Paimon VARCHAR/CHAR types to Doris STRING type when they exceed Doris limits: - Paimon `VARCHAR` with length > 65,533 → Doris `STRING` - Paimon `CHAR` with length > 255 → Doris `STRING` This ensures compatibility while preserving data integrity during type mapping from Paimon to Doris. (cherry picked from commit 6622f50)
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
Contributor
Author
|
run buildall |
TPC-H: Total hot run time: 32657 ms |
TPC-DS: Total hot run time: 190847 ms |
ClickBench: Total hot run time: 28.94 s |
Contributor
FE UT Coverage ReportIncrement line coverage |
Contributor
Author
|
run external |
Contributor
Author
|
run buildall |
TPC-H: Total hot run time: 32360 ms |
TPC-DS: Total hot run time: 192529 ms |
ClickBench: Total hot run time: 28.49 s |
morrySnow
approved these changes
Sep 4, 2025
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
bp #55051