sollhui commented on code in PR #65127:
URL: https://github.com/apache/doris/pull/65127#discussion_r3557308939


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/load/NereidsLoadScanProvider.java:
##########
@@ -372,7 +373,12 @@ private void 
fillContextExprMap(List<NereidsImportColumnDesc> columnDescList, Ne
                 // Use real column type for arrow/native format, other formats 
read as varchar first
                 if (fileFormatType == TFileFormatType.FORMAT_ARROW
                         || fileFormatType == TFileFormatType.FORMAT_NATIVE) {
-                    slotColumn = new Column(realColName, 
colToType.get(realColName), true);
+                    Type slotType = tblColumn == null ? 
colToType.get(realColName) : tblColumn.getType();

Review Comment:
   No. tbl.getColumn(columnName) uses the table's case-insensitive nameToColumn 
map over the full schema, while colToType is built from getBaseSchema() and is 
only a subset. Therefore, if tblColumn == null, colToType.get(realColName) 
cannot return a valid type. This fallback only results in the explicit Unknown 
column error below.



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