Copilot commented on code in PR #12234:
URL: https://github.com/apache/gluten/pull/12234#discussion_r3361410561
##########
backends-velox/src/test/scala/org/apache/gluten/execution/FallbackSuite.scala:
##########
@@ -344,6 +344,38 @@ class FallbackSuite extends
VeloxWholeStageTransformerSuite with AdaptiveSparkPl
}
}
+ test("orcUseColumnNames should respect orc.force.positional.evolution") {
+ // When `orc.force.positional.evolution=true`, ORC must be read by
position even though
+ // orcUseColumnNames defaults to true. The effective orcUseColumnNames
therefore becomes
+ // false, which (as in the test above) requires passing the data schema to
Velox and
+ // falls back when the schema contains an unsupported type (timestamp_ntz
here).
+ val query = "SELECT c2 FROM test"
Review Comment:
This new test doesn’t directly cover the regression described in #12232 (ORC
file schema column names differ from metastore schema, e.g. `_col0/_col1`, and
`orc.force.positional.evolution=true` should still return correct/non-empty
results). It instead asserts fallback behavior via the current “unsupported
type when schema is passed” path, which is an indirect proxy and can become
brittle if schema-validation/fallback behavior changes (e.g., TimestampNTZ
support improves).
Consider adding a dedicated ORC positional-evolution test that (1) writes
ORC data with positional column names (or otherwise mismatched names), (2)
creates/points a table with different column names at the same location, (3)
sets `spark.hadoop.orc.force.positional.evolution=true` while keeping
`orcUseColumnNames=true`, and (4) asserts Gluten returns the correct rows (not
0/empty).
--
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]