Skip to content

[SPARK-57717][SQL] Pin BIN_BY_ENABLED explicitly in BIN BY tests#56815

Open
vranes wants to merge 1 commit into
apache:masterfrom
vranes:bin-by-test-default-istesting
Open

[SPARK-57717][SQL] Pin BIN_BY_ENABLED explicitly in BIN BY tests#56815
vranes wants to merge 1 commit into
apache:masterfrom
vranes:bin-by-test-default-istesting

Conversation

@vranes

@vranes vranes commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

The two BIN BY tests that assert the operator is rejected now pin spark.sql.binByRelationOperator.enabled explicitly (= false) via withSQLConf, instead of relying on the config's default:

  • BinBySuite and ResolveBinBySuite: 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 in withSQLConf(BIN_BY_ENABLED.key -> "false").
  • ResolveBinBySuite also drops the assert(!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.enabled default 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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant