dejankrak-db commented on code in PR #50082: URL: https://github.com/apache/spark/pull/50082#discussion_r1971394139
########## sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/ResolveDDLCommandStringTypes.scala: ########## @@ -48,12 +48,18 @@ object ResolveDDLCommandStringTypes extends Rule[LogicalPlan] { case createView: CreateView if createView.collation.isDefined => StringType(createView.collation.get) case alterTable: AlterTableCommand if alterTable.table.resolved => - val collation = Option(alterTable - .table.asInstanceOf[ResolvedTable] - .table.properties.get(TableCatalog.PROP_COLLATION)) - if (collation.isDefined) { - StringType(collation.get) + if (alterTable.table.isInstanceOf[ResolvedTable]) { Review Comment: Yes, makes sense, it is much cleaner this way, I implemented the changes, thank you both! -- 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