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.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SPARK-48700][SQL] Mode expression for complex types (all collations) #47154
[SPARK-48700][SQL] Mode expression for complex types (all collations) #47154
Changes from 20 commits
a909cb1
ce865a9
d697403
535b16b
066ebd4
f2d0503
4f0cfbe
432de23
a8d626b
d621b8a
af97fe8
bf91fe9
0b7364f
ca564d3
96c742f
d5552cd
ce8986f
2632b91
72483ac
4695462
b285a6f
e330698
f4074be
adae8f3
37efd0c
afd123b
f4c39b1
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UNSUPPORTED_MODE_DATA_TYPE
is a sub-condition ofDATATYPE_MISMATCH
. You cannot refers to it in this way. Could you add a test for this case, please.BTW, if you cannot reproduce the error via public API, we should consider to convert it to an internal error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MaxGekk For the test, I suppose the situation where a type is not binary stable and is not covered by checkInputDataTypes would include some UDTs? checkInputType just confirms it is not a MapType (a blacklist/blocklist), whereas
collationAwareTransform
is an allowlist/whitelist).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MaxGekk @uros-db I am having a lot of trouble with this one! I implemented it as COMPLEX_EXPRESSION_UNSUPPORTED_INPUT.NO_INPUT, and plan to create a different subclass that represents this situation (Maybe BAD_INPUT), once I just have it working. But When I throw the following:
I end up getting:
Yet if I do
Then
org.apache.spark.ErrorClassesJsonReader#getMessageTemplate
fails during the assertionassert(errorInfo.subClass.isDefined == subErrorClass.isDefined)
As the subClass is missing.
Would either of you be able to tell me if this is the right pattern (eg. maybe it should be ComplexExpressionException("BAD_INPUT"), not sure what is the "old" pattern and which is the preferred one).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MaxGekk please re-review