uros-db commented on code in PR #48222:
URL: https://github.com/apache/spark/pull/48222#discussion_r1775448028
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/SparkSqlParser.scala:
##########
@@ -149,6 +149,10 @@ class SparkSqlAstBuilder extends AstBuilder {
* }}}
*/
override def visitSetCollation(ctx: SetCollationContext): LogicalPlan =
withOrigin(ctx) {
+ val collationName = ctx.collationName.getText
+ if (!SQLConf.get.trimCollationEnabled &&
collationName.toUpperCase().contains("TRIM")) {
+ throw QueryCompilationErrors.trimCollationNotEnabledError()
+ }
Review Comment:
do we have a test for this? i.e. e2e sql test with "SET COLLATION ..._trim;")
--
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]