[SPARK-57717][SQL] Pin BIN_BY_ENABLED explicitly in BIN BY tests#56815
Open
vranes wants to merge 1 commit into
Open
[SPARK-57717][SQL] Pin BIN_BY_ENABLED explicitly in BIN BY tests#56815vranes wants to merge 1 commit into
vranes wants to merge 1 commit into
Conversation
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?
The two BIN BY tests that assert the operator is rejected now pin
spark.sql.binByRelationOperator.enabledexplicitly (= false) viawithSQLConf, instead of relying on the config's default:BinBySuiteandResolveBinBySuite: the "BIN BY is gated off by default" cases are renamed to "BIN BY is rejected when the operator is disabled" and wrap the query inwithSQLConf(BIN_BY_ENABLED.key -> "false").ResolveBinBySuitealso drops theassert(!SQLConf.get.getConf(BIN_BY_ENABLED))check, which asserted the default value directly.No production code changes; the config default stays
false.Why are the changes needed?
Tests should not depend on a config's default value. A case that runs without pinning the flag fails in any environment that flips the config on (for example a config-flip CI lane), even though the behavior under test is unchanged. Pinning the flag explicitly keeps the suites self-contained and stable across those lanes.
Does this PR introduce any user-facing change?
No. Test-only change; the
spark.sql.binByRelationOperator.enableddefault is unchanged.How was this patch tested?
Ran the updated suites locally:
build/sbt 'catalyst/testOnly *ResolveBinBySuite'(17 tests, all pass)build/sbt 'sql/testOnly *BinBySuite'(3 tests, all pass)scalastyle is clean for both modules.
Was this patch authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Claude Opus 4.8)