beliefer commented on code in PR #12438:
URL: https://github.com/apache/gluten/pull/12438#discussion_r3518312265


##########
backends-velox/src/main/scala/org/apache/gluten/backendsapi/velox/VeloxIteratorApi.scala:
##########
@@ -54,9 +54,16 @@ class VeloxIteratorApi extends IteratorApi with Logging {
       localFilesNode: LocalFilesNode,
       fileSchema: StructType,
       fileFormat: ReadFileFormat): LocalFilesNode = {
+    // For ORC/DWRF, always attach the table schema so the native reader can
+    // decide the column-mapping mode per file: files whose physical schema is
+    // all Hive placeholder names (_col0, ...) must be mapped by position even
+    // when orcUseColumnNames is true, matching vanilla Spark's per-file
+    // behavior in OrcUtils.requestedColumnIds. Without the table schema the
+    // native reader has nothing to remap file columns to.

Review Comment:
   No. Actually, the fileSchema is the table schema.



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