Skip to content

[SPARK-47413][SQL] - add support to substr/left/right for collations [Post-Refactor]#46039

Closed
GideonPotok wants to merge 5 commits into
apache:masterfrom
GideonPotok:spark_collation_47413_4
Closed

[SPARK-47413][SQL] - add support to substr/left/right for collations [Post-Refactor]#46039
GideonPotok wants to merge 5 commits into
apache:masterfrom
GideonPotok:spark_collation_47413_4

Conversation

@GideonPotok

@GideonPotok GideonPotok commented Apr 13, 2024

Copy link
Copy Markdown
Contributor

https://issues.apache.org/jira/browse/SPARK-46830

What changes were proposed in this pull request?

Add collation support to types of return values for calls to substr, left, right, when passed in arguments of an explicit, implicit, or session-specified collations. Add tests to validate behavior.

Why are the changes needed?

We are incrementally adding collation support to built-in string functions in Spark. These functions are intended to be supported for collated types.

Does this PR introduce any user-facing change?

these sql functions will now not throw errors when passed in collated types. Instead, they will return the right value, of the passed in type. Or of the default collation.

How was this patch tested?

Unit testing + ad-hoc spark shell and pyspark shell interactions.

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

No.

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.

1 participant