[SPARK-56614][SQL][CONNECT][TESTS][FOLLOWUP] Pin strictDataFrameColumnResolution=true for lazy column validation test#55604
Closed
zhengruifeng wants to merge 1 commit into
Conversation
…nResolution=true for lazy column validation test
### What changes were proposed in this pull request?
Pin `spark.sql.analyzer.strictDataFrameColumnResolution=true` around the body of the `lazy column validation` test in `DataFrameSuite`. The config is set via `spark.conf.set/unset` rather than `withSQLConf` because the lazy SQLConf entry trips `withSQLConf`'s `isModifiable` check on the Connect server.
### Why are the changes needed?
The test asserts that `df4.schema` throws `AnalysisException` for `df1("x")` when `df1` does not contain `x`. This holds only under strict plan-id-based resolution; if the name-based fallback path is enabled, `df1("x")` resolves to `df2.x` from the join output and `df4.schema` succeeds. Today this works because `STRICT_DATAFRAME_COLUMN_RESOLUTION` defaults to `true`, but the test should not silently rely on that default; pinning it makes the assumption explicit and keeps the test robust against future default changes or environments where the default is overridden.
### Does this PR introduce _any_ user-facing change?
No. Test-only change.
### How was this patch tested?
Existing `DataFrameSuite."lazy column validation"`.
### Was this patch authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Anthropic), claude-opus-4-7
HyukjinKwon
approved these changes
Apr 29, 2026
Contributor
Author
|
merged to master |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
Pin
spark.sql.analyzer.strictDataFrameColumnResolution=truearound the body of thelazy column validationtest inDataFrameSuite. The config is set viaspark.conf.set/unsetrather thanwithSQLConfbecause the lazy SQLConf entry tripswithSQLConf'sisModifiablecheck on the Connect server.Why are the changes needed?
The test asserts that
df4.schemathrowsAnalysisExceptionfordf1("x")whendf1does not containx. This holds only under strict plan-id-based resolution; if the name-based fallback path is enabled,df1("x")resolves todf2.xfrom the join output anddf4.schemasucceeds. Today this works becauseSTRICT_DATAFRAME_COLUMN_RESOLUTIONdefaults totrue, but the test should not silently rely on that default; pinning it makes the assumption explicit and keeps the test robust against future default changes or environments where the default is overridden.Does this PR introduce any user-facing change?
No. Test-only change.
How was this patch tested?
Existing
DataFrameSuite."lazy column validation".Was this patch authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Anthropic), claude-opus-4-7