Skip to content
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-47504][SQL] Resolve AbstractDataType simpleStrings for StringTypeCollated #45694

Closed
wants to merge 11 commits into from

Conversation

mihailom-db
Copy link
Contributor

@mihailom-db mihailom-db commented Mar 25, 2024

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
@mihailom-db mihailom-db changed the title [SPARK-47504][SQL][COLLATION] Resolve AbstractDataType simpleStrings for StringTypeCollated [SPARK-47504][SQL] Resolve AbstractDataType simpleStrings for StringTypeCollated Mar 26, 2024
@@ -30,6 +30,7 @@ abstract class StringTypeCollated extends AbstractDataType {
* 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
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"?

@mihailom-db
Copy link
Contributor Author

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

@cloud-fan
Copy link
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
3 participants