forked from apache/spark
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SPARK-47413][SQL] - add support to substr/left/right for collations
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. Closes apache#46040 from GideonPotok/spark_collation_47413_5. Authored-by: GideonPotok <g.potok4@gmail.com> Signed-off-by: Wenchen Fan <wenchen@databricks.com>
- Loading branch information
1 parent
36cbf6a
commit 6f95a80
Showing
2 changed files
with
53 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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