Skip to content

branch-4.1: [fix](iceberg) Support nested decimal precision promotion #65122#65144

Merged
yiguolei merged 1 commit into
branch-4.1from
auto-pick-65122-branch-4.1
Jul 3, 2026
Merged

branch-4.1: [fix](iceberg) Support nested decimal precision promotion #65122#65144
yiguolei merged 1 commit into
branch-4.1from
auto-pick-65122-branch-4.1

Conversation

@github-actions

@github-actions github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Cherry-picked from #65122

@github-actions github-actions Bot requested a review from yiguolei as a code owner July 2, 2026 06:26
@hello-stephen

Copy link
Copy Markdown
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@hello-stephen

Copy link
Copy Markdown
Contributor

run buildall

Fix Iceberg complex column schema evolution validation for nested
decimal precision widening.

Doris validates complex column modifications before committing Iceberg
schema updates. The previous nested primitive promotion rules covered
varchar length growth, exact matches, integer widening, and `FLOAT ->
DOUBLE`, but missed Iceberg's valid decimal promotion rule:

```text
decimal(P, S) -> decimal(P', S), where P' >= P and S is unchanged
```

This patch keeps the internal table complex type schema-change path on
the existing strict nested promotion rules:

- integer widening
- `FLOAT -> DOUBLE`

Iceberg complex column schema evolution uses a separate validation entry
point that additionally accepts decimal precision widening when both
sides are decimal, scale is unchanged, and destination precision is not
smaller. This keeps internal table nested decimal schema-change behavior
unchanged.

## Why

The internal table schema change matrix is broader than Iceberg schema
evolution semantics. It allows conversions such as decimal bucket
changes, date/string conversions, and other casts that are not safe
metadata-only promotions for Iceberg nested schema evolution.

## Tests

```bash
mvn test -pl fe-core -am \
  -Dcheckstyle.skip=true \
  -DfailIfNoTests=false \
  -Dmaven.build.cache.enabled=false \
  -Dtest=ColumnTest,IcebergMetadataOpsValidationTest
```
@yiguolei yiguolei force-pushed the auto-pick-65122-branch-4.1 branch from 46177c9 to de258f7 Compare July 3, 2026 12:38
@yiguolei

yiguolei commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

run buildall

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor Author

PR approved by at least one committer and no changes requested.

@github-actions github-actions Bot added the approved Indicates a PR has been approved by one committer. label Jul 3, 2026
@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor Author

PR approved by anyone and no changes requested.

@hello-stephen

Copy link
Copy Markdown
Contributor

FE UT Coverage Report

Increment line coverage 70.59% (24/34) 🎉
Increment coverage report
Complete coverage report

@hello-stephen

Copy link
Copy Markdown
Contributor

FE Regression Coverage Report

Increment line coverage 50.00% (17/34) 🎉
Increment coverage report
Complete coverage report

@yiguolei

yiguolei commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

skip buildall

@yiguolei yiguolei merged commit 22b1f5f into branch-4.1 Jul 3, 2026
32 of 34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by one committer. reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants