panbingkun commented on code in PR #48087:
URL: https://github.com/apache/spark/pull/48087#discussion_r1758994380
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/generators.scala:
##########
@@ -618,3 +619,44 @@ case class SQLKeywords() extends LeafExpression with
Generator with CodegenFallb
override def prettyName: String = "sql_keywords"
}
+
+@ExpressionDescription(
+ usage = """_FUNC_() - Get all of the Spark SQL string collations""",
+ examples = """
+ Examples:
+ > SELECT * FROM _FUNC_() WHERE COLLATION_NAME = 'UTF8_BINARY';
+ SYSTEM BUILTIN UTF8_BINARY NULL NULL ACCENT_SENSITIVE
CASE_SENSITIVE NO_PAD NULL
+ """,
+ since = "4.0.0",
+ group = "generator_funcs")
+case class AllCollations() extends LeafExpression with Generator with
CodegenFallback {
+ override def elementSchema: StructType = new StructType()
+ .add("COLLATION_CATALOG", StringType, nullable = false)
+ .add("COLLATION_SCHEMA", StringType, nullable = false)
+ .add("COLLATION_NAME", StringType, nullable = false)
Review Comment:
I agree with it because `sql_keywords` doesn't seem to have a prefix either.
<img width="771" alt="image"
src="https://github.com/user-attachments/assets/f7c30133-5686-4fb1-8a97-63b7fd372138">
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]