wForget commented on code in PR #12234:
URL: https://github.com/apache/gluten/pull/12234#discussion_r3356368675
##########
gluten-substrait/src/main/scala/org/apache/gluten/config/GlutenConfig.scala:
##########
@@ -576,6 +576,16 @@ object GlutenConfig extends ConfigRegistry {
}
.foreach { case (k, v) => nativeConfMap.put(k, v) }
+ // When `orc.force.positional.evolution=true`, vanilla Spark maps ORC
columns by
+ // position rather than by name (see OrcUtils.requestedColumnIds). The
Velox ORC reader
+ // must do the same, otherwise name-based matching against a mismatched
file schema
+ // reads columns back as null/empty. Override the (Velox)
orcUseColumnNames session conf
+ // so native reads ORC by position too. Harmless for backends that ignore
this key.
+ // String literal is used because gluten-substrait cannot depend on
backends-velox.
+ if (conf.getOrElse("spark.hadoop.orc.force.positional.evolution",
"false").toBoolean) {
Review Comment:
Would it be better to place this in `getNativeBackendConf`?
--
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]