uros-db commented on code in PR #48222:
URL: https://github.com/apache/spark/pull/48222#discussion_r1775453049
##########
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:
also, given the changes in
"sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/AstBuilder.scala",
are we sure that we need this?
--
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]