You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by we...@apache.org on 2024/08/08 13:50:58 UTC
(spark) branch master updated: [SPARK-47410][SQL][FOLLOWUP] Update StringType interface for collation support
This is an automated email from the ASF dual-hosted git repository.
wenchen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/master by this push:
new 61d8c3b2b45f [SPARK-47410][SQL][FOLLOWUP] Update StringType interface for collation support
61d8c3b2b45f is described below
commit 61d8c3b2b45f6fc454690d575ac449a30003ac23
Author: Uros Bojanic <15...@users.noreply.github.com>
AuthorDate: Thu Aug 8 21:50:42 2024 +0800
[SPARK-47410][SQL][FOLLOWUP] Update StringType interface for collation support
### What changes were proposed in this pull request?
Following up on SPARK-47410, add `supportsLowercaseEquality` to `StringType`.
### Why are the changes needed?
Make the `StringType` API complete.
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
Existing tests.
### Was this patch authored or co-authored using generative AI tooling?
No.
Closes #47622 from uros-db/update-string-type.
Authored-by: Uros Bojanic <15...@users.noreply.github.com>
Signed-off-by: Wenchen Fan <we...@databricks.com>
---
sql/api/src/main/scala/org/apache/spark/sql/types/StringType.scala | 3 +++
1 file changed, 3 insertions(+)
diff --git a/sql/api/src/main/scala/org/apache/spark/sql/types/StringType.scala b/sql/api/src/main/scala/org/apache/spark/sql/types/StringType.scala
index 424f35135fb4..383c58210d8b 100644
--- a/sql/api/src/main/scala/org/apache/spark/sql/types/StringType.scala
+++ b/sql/api/src/main/scala/org/apache/spark/sql/types/StringType.scala
@@ -39,6 +39,9 @@ class StringType private(val collationId: Int) extends AtomicType with Serializa
def supportsBinaryEquality: Boolean =
CollationFactory.fetchCollation(collationId).supportsBinaryEquality
+ def supportsLowercaseEquality: Boolean =
+ CollationFactory.fetchCollation(collationId).supportsLowercaseEquality
+
def isUTF8BinaryCollation: Boolean =
collationId == CollationFactory.UTF8_BINARY_COLLATION_ID
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org