Skip to content

[SPARK-47504][SQL] Resolve AbstractDataType simpleStrings for StringTypeCollated#45694

Closed
mihailomilosevic2001 wants to merge 11 commits into
apache:masterfrom
mihailomilosevic2001:SPARK-47504
Closed

[SPARK-47504][SQL] Resolve AbstractDataType simpleStrings for StringTypeCollated#45694
mihailomilosevic2001 wants to merge 11 commits into
apache:masterfrom
mihailomilosevic2001:SPARK-47504

Conversation

@mihailomilosevic2001

@mihailomilosevic2001 mihailomilosevic2001 commented Mar 25, 2024

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Renaming simpleString in StringTypeAnyCollation. This PR should only be merged after #45383 is merged.

Why are the changes needed?

SPARK-47296 introduced a change to fail all unsupported functions. Because of this change expected inputTypes in ExpectsInputTypes had to be changed. This change introduced a change on user side which will print "STRING_ANY_COLLATION" in places where before we printed "STRING" when an error occurred. Concretely if we get an input of Int where StringTypeAnyCollation was expected, we will throw this faulty message for users.

Does this PR introduce any user-facing change?

Yes

How was this patch tested?

Existing tests were changed back to "STRING" notation.

Was this patch authored or co-authored using generative AI tooling?

No.

@github-actions github-actions Bot added the SQL label Mar 25, 2024
@mihailomilosevic2001 mihailomilosevic2001 changed the title [SPARK-47504][SQL][COLLATION] Resolve AbstractDataType simpleStrings for StringTypeCollated [SPARK-47504][SQL] Resolve AbstractDataType simpleStrings for StringTypeCollated Mar 26, 2024
* Use StringTypeBinary for expressions supporting only binary collation.
*/
case object StringTypeBinary extends StringTypeCollated {
// TODO (SPARK-47504): Rename this AbstractDataType's simpleString when it is first used

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we fix it now as we know it should be "string"?

@mihailomilosevic2001

Copy link
Copy Markdown
Contributor Author

@cloud-fan Could we merge this in? So some new PR does not conflict with it again.

@cloud-fan

Copy link
Copy Markdown
Contributor

thanks, merging to master!

@cloud-fan cloud-fan closed this in abb7b04 Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants