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


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/ApplyDefaultCollationToStringType.scala:
##########
@@ -52,6 +52,11 @@ object ApplyDefaultCollationToStringType extends 
Rule[LogicalPlan] {
       case createView: CreateView =>
         createView.collation
 
+      // Temporary views are created via CreateViewCommand, which we can't 
import here.
+      // Instead, we use the CreateTempView trait to access the collation.
+      case createTempView: CreateTempView =>

Review Comment:
   Because without this change `CREATE TEMPORARY VIEW v DEFAULT COLLATION 
UTF8_LCASE AS SELECT 'a'` doesn't have correct alias name for `a`. It will be 
just `a`, instead of `a collate UTF8_LCASE`.



-- 
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]

Reply via email to