raghav-reglobe opened a new pull request, #66813:
URL: https://github.com/apache/doris/pull/66813
### What problem does this PR solve?
Issue Number: close #66811
Related PR: none
Problem Summary:
The `-1` schema-dictionary entry (`IcebergSchemaUtils.buildCurrentSchema`)
echoed the requested (pruned) column names verbatim as its top-level `TField`
names. When the requested names arrive lowercased while the table has
mixed-case columns, the dictionary no longer matches the BE scan slots (which
preserve the Iceberg column case), and `ParquetReader`'s projection guard
refuses every such column with `schema mapping is missing projected column
'channelId'` — plain scalar columns included, so any external Iceberg table
with a camelCase column becomes unreadable.
The fix keeps the requested name only as the case-insensitive lookup key
(`caseInsensitiveFindField`) and emits the schema's own field case as the
top-level name — which equals the Doris `Column` / BE slot name. This also
restores the legacy fe-core behavior (`ExternalUtil` built the dictionary from
Doris Columns, real case). The already-cased request path (#65094) is
unchanged: both paths now converge on the schema's case. Verified against a
production estate whose tables are largely camelCase (MongoDB-derived) —
byte-identical results vs the pre-refactor reader after the fix.
### Release note
Fix mixed-case column reads on external Iceberg tables ("schema mapping is
missing projected column").
### 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:
- Behavior changed:
- [ ] No.
- [x] Yes. Dictionary top-level names now carry the schema's case
instead of echoing a lowered request; updated the unit test that pinned the
lowered-echo behavior
(`topLevelFieldsCarrySchemaCaseEvenWhenRequestIsLowercased`), kept
`topLevelFieldsPreserveMixedCaseRequestedNames` green.
- Does this need documentation?
- [x] No.
- [ ] Yes.
--
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]