hubgeter opened a new pull request, #68003:
URL: https://github.com/apache/doris/pull/68003

   ### What problem does this PR solve?
   
   Issue Number: N/A
   
   Related PR: N/A
   
   Problem Summary:
   
   When the Iceberg table property `schema.name-mapping.default` is present but 
malformed, the FE caught the parse failure and rebuilt a "current schema" name 
mapping, which is authoritative. Data files that do not carry Iceberg field ids 
could then only be resolved by their current column names. After a column 
rename the old physical column is unmatched, V2 semantics materializes NULL for 
it, and the query succeeds with historical values lost. If the old name was 
later reused by another column, the fallback could even bind the wrong physical 
column.
   
   Iceberg itself does not degrade like this: Spark's `BaseReader` parses 
`schema.name-mapping.default` while constructing the reader and fails the query 
for a malformed value (`IllegalArgumentException` / `UncheckedIOException`), 
regardless of whether the data files carry field ids.
   
   This PR removes the current-schema fallback and reports the metadata fault 
instead. `IcebergUtils.getNameMapping` now throws a `UserException` that names 
the table, the property, the root cause and the remediation, so the failure is 
visible instead of silently returning NULL. Metadata (system) table scans are 
excluded, because they never resolve physical data columns by name.
   
   ### Release note
   
   None
   
   ### Check List (For Author)
   
   - Test
       - [ ] Regression test
       - [x] 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:
       - [x] 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


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to