[SPARK-47567][SQL] Support LOCATE function to work with collated strings#45791
Closed
miland-db wants to merge 32 commits into
Closed
[SPARK-47567][SQL] Support LOCATE function to work with collated strings#45791miland-db wants to merge 32 commits into
miland-db wants to merge 32 commits into
Conversation
Contributor
Author
|
Adding @uros-db |
uros-db
reviewed
Apr 1, 2024
uros-db
reviewed
Apr 1, 2024
uros-db
reviewed
Apr 1, 2024
Contributor
Author
|
Adding Belgrade collation crew: @stefankandic @mihailom-db @nikolamand-db @dbatomic |
stefankandic
reviewed
Apr 3, 2024
stefankandic
reviewed
Apr 3, 2024
uros-db
reviewed
Apr 3, 2024
uros-db
reviewed
Apr 3, 2024
uros-db
reviewed
Apr 3, 2024
uros-db
reviewed
Apr 3, 2024
# Conflicts: # sql/core/src/test/scala/org/apache/spark/sql/CollationStringExpressionsSuite.scala
uros-db
reviewed
Apr 4, 2024
dbatomic
reviewed
Apr 8, 2024
dbatomic
reviewed
Apr 8, 2024
Contributor
|
heads up: we’ve done some major code restructuring in #45978, so please sync these changes before moving on @miland-db you’ll likely need to rewrite the code in this PR, so please follow the guidelines outlined in https://issues.apache.org/jira/browse/SPARK-47410 |
# Conflicts: # common/unsafe/src/main/java/org/apache/spark/sql/catalyst/util/CollationFactory.java # sql/core/src/test/scala/org/apache/spark/sql/CollationStringExpressionsSuite.scala
# Conflicts: # sql/core/src/test/scala/org/apache/spark/sql/CollationStringExpressionsSuite.scala
# Conflicts: # sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/CollationTypeCasts.scala # sql/core/src/test/scala/org/apache/spark/sql/CollationStringExpressionsSuite.scala
# Conflicts: # common/unsafe/src/main/java/org/apache/spark/sql/catalyst/util/CollationSupport.java
uros-db
suggested changes
Apr 22, 2024
uros-db
left a comment
Contributor
There was a problem hiding this comment.
just flagging this PR will likely need a fix for the ICU implementation
# Conflicts: # common/unsafe/src/main/java/org/apache/spark/sql/catalyst/util/CollationSupport.java # common/unsafe/src/test/java/org/apache/spark/unsafe/types/CollationSupportSuite.java # sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/CollationTypeCasts.scala # sql/core/src/test/scala/org/apache/spark/sql/CollationStringExpressionsSuite.scala
# Conflicts: # sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/CollationTypeCasts.scala
# Conflicts: # sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/CollationTypeCasts.scala
# Conflicts: # sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/CollationTypeCasts.scala
# Conflicts: # common/unsafe/src/main/java/org/apache/spark/sql/catalyst/util/CollationSupport.java # common/unsafe/src/test/java/org/apache/spark/unsafe/types/CollationSupportSuite.java
uros-db
approved these changes
Apr 27, 2024
uros-db
left a comment
Contributor
There was a problem hiding this comment.
lgtm, @cloud-fan please review
cloud-fan
approved these changes
Apr 29, 2024
Contributor
|
thanks, merging to master! |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What changes were proposed in this pull request?
Extend built-in string functions to support non-binary, non-lowercase collation for: locate
Why are the changes needed?
Update collation support for built-in string functions in Spark.
Does this PR introduce any user-facing change?
Yes, users should now be able to use COLLATE within arguments for built-in string function LOCATE in Spark SQL queries, using non-binary collations such as UNICODE_CI.
How was this patch tested?
Unit tests for queries using StringLocate (
CollationStringExpressionsSuite.scala).Was this patch authored or co-authored using generative AI tooling?
No