[fix](paimon)Handle oversized CHAR/VARCHAR fields in Paimon to Doris type mapping#55051
Merged
morningman merged 8 commits intoapache:masterfrom Aug 28, 2025
Merged
Conversation
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
Contributor
Author
|
run buildall |
Contributor
Author
|
run buildall |
TPC-H: Total hot run time: 34695 ms |
TPC-DS: Total hot run time: 185749 ms |
ClickBench: Total hot run time: 32.36 s |
Contributor
FE UT Coverage ReportIncrement line coverage |
Contributor
Author
|
run buildall |
TPC-H: Total hot run time: 33797 ms |
TPC-DS: Total hot run time: 185477 ms |
ClickBench: Total hot run time: 33.21 s |
Contributor
FE UT Coverage ReportIncrement line coverage |
Contributor
|
PR approved by anyone and no changes requested. |
morningman
approved these changes
Aug 28, 2025
Contributor
|
PR approved by at least one committer and no changes requested. |
github-actions bot
pushed a commit
that referenced
this pull request
Aug 28, 2025
…type mapping (#55051) ### What problem does this PR solve? In PR #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.
vinlee19
pushed a commit
to vinlee19/doris
that referenced
this pull request
Sep 1, 2025
…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)
16 tasks
morningman
pushed a commit
that referenced
this pull request
Sep 4, 2025
wenzhenghu
pushed a commit
to wenzhenghu/doris
that referenced
this pull request
Sep 8, 2025
### What problem does this PR solve? Related PR: apache#55051 apache#55070 apache#55051 changed the paimon Type from `varchar(2147483647)` to `text` apache#55070 added the case
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.
What problem does this PR solve?
In PR #49623, we implemented conversion from Paimon
VARCHAR/CHARtypes to DorisVARCHAR/CHARtypes. 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 between1and2,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 between1and2,147,483,647(inclusive). Defaults to n=1 if no length is specified.Apache Doris:
CHAR: Maximum length is255charactersVARCHAR: Maximum length is65,533charactersSolution:
This PR addresses the length constraint mismatch by automatically converting oversized Paimon VARCHAR/CHAR types to Doris STRING type when they exceed Doris limits:
VARCHARwith length > 65,533 → DorisSTRINGCHARwith length > 255 → DorisSTRINGThis ensures compatibility while preserving data integrity during type mapping from Paimon to Doris.
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)