You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "sezruby (via GitHub)" <gi...@apache.org> on 2026/05/05 16:23:03 UTC
[PR] [SPARK-56395][FOLLOWUP][SQL] Reject NearestByJoin when spark.sql.crossJoin.enabled is false [spark]
sezruby opened a new pull request, #55688:
URL: https://github.com/apache/spark/pull/55688
### What changes were proposed in this pull request?
Followup of #55629, addressing the review comment at https://github.com/apache/spark/pull/55629#discussion_r3185614384.
Adds a dedicated `CheckAnalysis` case that fails with `NEAREST_BY_JOIN.CROSS_JOIN_NOT_ENABLED` when a nearest-by join is attempted while `spark.sql.crossJoin.enabled = false`. Previously the query fell through to the generic cross-join check and produced a confusing, unrelated error.
### Why are the changes needed?
The nearest-by join is internally implemented as a bounded cross-product. Without this guard a user gets the misleading `_LEGACY_ERROR_TEMP_1211` cross-join error rather than a clear message explaining the relationship to `spark.sql.crossJoin.enabled`.
### Does this PR introduce _any_ user-facing change?
Yes. Users who run a nearest-by join with `spark.sql.crossJoin.enabled = false` now receive the structured error `NEAREST_BY_JOIN.CROSS_JOIN_NOT_ENABLED` with an actionable message instead of a generic cross-join error.
### How was this patch tested?
- New unit test in `AnalysisErrorSuite` (`NearestByJoin is rejected when spark.sql.crossJoin.enabled is false`)
- Updated SQL golden files (`join-nearest-by.sql.out`) regenerated to reflect the new error
### Was this patch authored or co-authored using generative AI tooling?
Generated-by: Claude Code (claude-sonnet-4-6)
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
Re: [PR] [SPARK-56395][FOLLOWUP][SQL] Reject NearestByJoin when spark.sql.crossJoin.enabled is false [spark]
Posted by "gengliangwang (via GitHub)" <gi...@apache.org>.
gengliangwang commented on PR #55688:
URL: https://github.com/apache/spark/pull/55688#issuecomment-4383591970
Thanks, merging to master/4.2
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
Re: [PR] [SPARK-56395][FOLLOWUP][SQL] Reject NearestByJoin when spark.sql.crossJoin.enabled is false [spark]
Posted by "gengliangwang (via GitHub)" <gi...@apache.org>.
gengliangwang closed pull request #55688: [SPARK-56395][FOLLOWUP][SQL] Reject NearestByJoin when spark.sql.crossJoin.enabled is false
URL: https://github.com/apache/spark/pull/55688
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
Re: [PR] [SPARK-56395][FOLLOWUP][SQL] Reject NearestByJoin when spark.sql.crossJoin.enabled is false [spark]
Posted by "dilipbiswal (via GitHub)" <gi...@apache.org>.
dilipbiswal commented on PR #55688:
URL: https://github.com/apache/spark/pull/55688#issuecomment-4381227892
cc @gengliangwang
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org