ilicmarkodb commented on code in PR #50436:
URL: https://github.com/apache/spark/pull/50436#discussion_r2020664790


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/SessionCatalog.scala:
##########
@@ -987,9 +987,17 @@ class SessionCatalog(
           parser.parseQuery(viewText)
         }
     }
+    // The metadata.viewText contains only the AS query part of CREATE VIEW 
statement
+    // and does not include the DEFAULT COLLATION part, resulting in a plan 
without collation.
+    val plan = if (metadata.collation.isDefined) {
+      val newType = StringType(metadata.collation.get)
+      ResolveDDLCommandStringTypes.transformPlan(parsedPlan, newType)

Review Comment:
   I think that created View doesn't pass through 
`ResolveDDLCommandStringTypes`. I tried to catch it with debugger.



-- 
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: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to