Skip to content

[feature](iceberg) Support nested column schema change#65329

Draft
hubgeter wants to merge 1 commit into
apache:masterfrom
hubgeter:iceberg_nested_sc_master
Draft

[feature](iceberg) Support nested column schema change#65329
hubgeter wants to merge 1 commit into
apache:masterfrom
hubgeter:iceberg_nested_sc_master

Conversation

@hubgeter

@hubgeter hubgeter commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Support nested Iceberg column paths in external schema change operations and wire parser/analyzer metadata ops through ColumnPath.

What problem does this PR solve?

Issue Number: close #xxx

Related PR: #xxx

Problem Summary:

Release note

None

Check List (For Author)

  • Test

    • Regression test
    • Unit Test
    • Manual test (add detailed scripts or steps below)
    • No need to test or manual test. Explain why:
      • This is a refactor/code format and no logic has been changed.
      • Previous test can cover this change.
      • No code files have been changed.
      • Other reason
  • Behavior changed:

    • No.
    • Yes.
  • Does this need documentation?

    • No.
    • Yes.

Check List (For Reviewer who merge this PR)

  • Confirm the release note
  • Confirm test cases
  • Confirm document
  • Add branch pick label

Support nested Iceberg column paths in external schema change operations and wire parser/analyzer metadata ops through ColumnPath.
@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?

@hubgeter

hubgeter commented Jul 7, 2026

Copy link
Copy Markdown
Contributor Author

/review

@hubgeter

hubgeter commented Jul 7, 2026

Copy link
Copy Markdown
Contributor Author

run buildall

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review completed for PR 65329.

Requesting changes for two issues:

  • Nested Iceberg schema evolution resolves user-supplied paths with exact Iceberg field-name lookup even though Doris exposes Iceberg metadata in lower case, so mixed-case schemas created by Spark or another Iceberg writer cannot be altered through the Doris-visible path.
  • The new regression suite validates deterministic DESC and ordered query output with Groovy assertions only and does not add the generated .out baseline expected by the Doris regression framework.

Review checkpoints:

  • Scope/head verified against PR head 951be9baa362ef7b91d21ae95afcef66736a7432; existing inline review context was empty.
  • Changed FE parser/command/metadata-op paths, Iceberg nested schema-change flow, and added tests were reviewed.
  • Security review was not applicable to this PR.
  • Validation is static only: this checkout is missing thirdparty/installed and thirdparty/installed/bin/protoc, so I did not run FE or regression tests.

Subagent conclusions:

  • optimizer-rewrite reported NO_NEW_VALUABLE_FINDINGS.
  • tests-session-config proposed TSC-1, which was verified and submitted as the regression .out baseline inline comment.
  • Final convergence round completed with both live subagents replying NO_NEW_VALUABLE_FINDINGS for the same two-comment final set.

User focus: no additional user-provided review focus was supplied.

FROM ${tableName}
ORDER BY id
"""
assertTrue(queryRows.size() == 2, queryRows.toString())

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please convert these deterministic result checks to qt_/order_qt_ output checks and add the generated .out file. This suite validates the final DESC schema and the ordered query result only through Groovy assertTrue calls, and there is currently no regression-test/data/external_table_p0/iceberg/test_iceberg_nested_schema_evolution_ddl.out. That leaves the user-visible output outside the regression framework baseline checks, contrary to the repo rule for determined expected results.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Anchor correction for the mixed-case nested Iceberg path comment.

currentPath += part;

if (currentType.isStructType()) {
NestedField field = currentType.asStructType().field(part);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please make nested path resolution case-insensitive and return the canonical Iceberg path before calling UpdateSchema. Doris lower-cases Iceberg metadata when it builds Column/StructField, so a Spark-created schema such as Info STRUCT<Metric: INT> is exposed to users as info.metric. This resolver uses StructType.field(part), which is exact-name lookup, and modifyColumn also calls exact schema.findField(columnPath.getFullPath()); as a result ALTER TABLE ... MODIFY COLUMN info.metric ... and adding a child under info reject the existing field even though that is the only Doris-visible spelling. Please resolve with Iceberg case-insensitive APIs, then pass the canonical path names to validation and updateSchema.*.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants