marko-radoicic-db opened a new pull request, #60762:
URL: https://github.com/apache/spark/pull/60762
### What changes were proposed in this pull request?
This PR removes the internal SQL config
`spark.sql.analyzer.preferColumnOverLcaInArrayIndex`
(`SQLConf.PREFER_COLUMN_OVER_LCA_IN_ARRAY_INDEX`), which was added in
SPARK-53734 and defaults to `true`.
The default behavior is now hardcoded in `ColumnResolutionHelper`: the
extraction key of an `UnresolvedExtractValue` is always resolved, so a table
column takes precedence over a lateral column alias with the same name. The
legacy `false` path and its test case are removed. The SPARK-53734 test in
`SQLQuerySuite` now checks only the default behavior.
No `removedSQLConfigs` (`RemovedConfig`) entry is added. This follows the
SPARK-57372 precedent (91263564ce6), which removed an internal flag without
one. Reviewers may want an entry here because setting the config to `false`
changed behavior.
### Why are the changes needed?
The config was an escape hatch that restored the legacy lateral column alias
resolution order for array indexes. The single-pass resolver does not support
that legacy behavior, so keeping the switch only leaves a code path that is not
exercised together with the single-pass resolver.
### Does this PR introduce _any_ user-facing change?
Yes, but only for an internal config. Setting
`spark.sql.analyzer.preferColumnOverLcaInArrayIndex` no longer has any effect.
The query behavior with default settings is unchanged.
### How was this patch tested?
The SPARK-53734 test case in `SQLQuerySuite` ("Prefer table column over LCA
when resolving array index") now checks the default behavior only. The changed
modules compile with `build/sbt catalyst/compile sql/Test/compile` on Java 21.
Tests were not run for this change.
### Was this patch authored or co-authored using generative AI tooling?
Generated-by: Isaac (Claude Opus 5.5)
This pull request and its description were written by Isaac.
--
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]