Skip to content

branch-4.0: [fix](multi-catalog) Preserve external partition metadata - #66010

Open
suxiaogang223 wants to merge 1 commit into
apache:branch-4.0from
suxiaogang223:codex/fix-4.0-per-range-partition-values
Open

branch-4.0: [fix](multi-catalog) Preserve external partition metadata#66010
suxiaogang223 wants to merge 1 commit into
apache:branch-4.0from
suxiaogang223:codex/fix-4.0-per-range-partition-values

Conversation

@suxiaogang223

Copy link
Copy Markdown
Member

What problem does this PR solve?

Issue Number: None

Related PR: #62821, #65583

Problem Summary: branch-4.0 only backported the Paimon side of the external partition metadata fixes. Hive-style scans, Hudi, Iceberg, and file load paths could still lose explicit NULL semantics or rely on physical file columns that are absent from migrated partitioned files. Iceberg also attached partition metadata only when runtime partition pruning was enabled and did not safely account for mixed transforms or partition evolution. This change adds common path partition parsing with aligned null flags, applies it to external scans and load paths, and sends stable Iceberg identity partition metadata for every split while respecting branch-4.0 scan-level slot constraints.

Release note

Fix partition-column materialization and NULL handling for Hive, Hudi, Iceberg, and file load paths on branch-4.0.

Check List (For Author)

  • Test: Unit Test
    • ./run-fe-ut.sh --run org.apache.doris.datasource.FilePartitionUtilsTest,org.apache.doris.datasource.hive.source.HiveScanNodeTest,org.apache.doris.datasource.iceberg.IcebergUtilsTest,org.apache.doris.datasource.iceberg.source.IcebergScanNodeTest,org.apache.doris.datasource.paimon.source.PaimonScanNodeTest
  • Behavior changed: Yes. External partition metadata and NULL values are materialized consistently per split.
  • Does this need documentation: No

@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?

@suxiaogang223 suxiaogang223 changed the title [fix](multi-catalog) Preserve external partition metadata branch-4.0: [fix](multi-catalog) Preserve external partition metadata Jul 24, 2026
@suxiaogang223

Copy link
Copy Markdown
Member Author

run buildall

@suxiaogang223

Copy link
Copy Markdown
Member Author

run buildall

@suxiaogang223
suxiaogang223 marked this pull request as ready for review July 30, 2026 06:21
### What problem does this PR solve?

Issue Number: None

Related PR: apache#62821, apache#65583

Problem Summary: branch-4.0 only backported the Paimon side of the external partition metadata fixes. Hive-style scans, Hudi, Iceberg, and file load paths could still lose explicit NULL semantics or rely on physical file columns that are absent from migrated partitioned files. Iceberg also attached partition metadata only when runtime partition pruning was enabled and did not safely account for mixed transforms or partition evolution. This change adds common path partition parsing with aligned null flags, applies it to external scans and load paths, and sends stable Iceberg identity partition metadata for every split while respecting branch-4.0 scan-level slot constraints.

### Release note

Fix partition-column materialization and NULL handling for Hive, Hudi, Iceberg, and file load paths on branch-4.0.

### Check List (For Author)

- Test: Unit Test
    - ./run-fe-ut.sh --run org.apache.doris.datasource.FilePartitionUtilsTest,org.apache.doris.datasource.hive.source.HiveScanNodeTest,org.apache.doris.datasource.iceberg.IcebergUtilsTest,org.apache.doris.datasource.iceberg.source.IcebergScanNodeTest,org.apache.doris.datasource.paimon.source.PaimonScanNodeTest
- Behavior changed: Yes. External partition metadata and NULL values are materialized consistently per split.
- Does this need documentation: No
@suxiaogang223
suxiaogang223 force-pushed the codex/fix-4.0-per-range-partition-values branch from ec1e7bc to da43b49 Compare July 31, 2026 02:25
@suxiaogang223

Copy link
Copy Markdown
Member Author

run buildall

@hello-stephen

Copy link
Copy Markdown
Contributor

FE UT Coverage Report

Increment line coverage 51.22% (84/164) 🎉
Increment coverage report
Complete coverage report

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