[SPARK-57576][SQL] Generalize error messages for set operations on MAP and VARIANT types#56614
Closed
KenanAdel wants to merge 2 commits into
Closed
[SPARK-57576][SQL] Generalize error messages for set operations on MAP and VARIANT types#56614KenanAdel wants to merge 2 commits into
KenanAdel wants to merge 2 commits into
Conversation
…n MAP and VARIANT types
Author
|
Closing this PR as I noticed another contributor has already submitted a comprehensive solution with full test coverage for this issue. Glad to see it being addressed |
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?
This PR updates the error messages for
SET_OPERATION_ON_MAP_TYPEandSET_OPERATION_ON_VARIANT_TYPEinerror-conditions.json.Previously, the messages incorrectly implied that the limitation only applies to DataFrame operations. In reality, the same error is also raised when using SQL queries.
This change rewrites the messages to be more general so they correctly describe the restriction for both DataFrame and SQL when performing set operations (like
INTERSECTandEXCEPT) onMAPandVARIANTtypes.Why are the changes needed?
The current wording is misleading because it focuses only on DataFrame usage.
However, these errors also happen in SQL execution, so the message should reflect both cases. This update removes confusion and makes the behavior clearer and more accurate for users.
Does this PR introduce any user-facing change?
Yes.
The error messages shown to users when they try invalid set operations on
MAPandVARIANTtypes have been updated.Before:
After:
This is purely a change in wording; the actual execution behavior is unchanged.
How was this patch tested?
SET_OPERATION_ON_MAP_TYPEandSET_OPERATION_ON_VARIANT_TYPEinDataFrameSetOperationsSuite.scalaandCollationSuite.scala.error-conditions.json.Was this patch authored or co-authored using generative AI tooling?
No