cloud-fan commented on code in PR #46267: URL: https://github.com/apache/spark/pull/46267#discussion_r1596850227
########## sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/view.scala: ########## @@ -35,6 +35,56 @@ object EliminateView extends Rule[LogicalPlan] with CastSupport { } } +/** + * ViewBindingMode is used to specify the expected schema binding mode when we want to create or + * replace a view in [[CreateViewStatement]]. + */ +sealed trait ViewSchemaMode { + override val toString: String = getClass.getSimpleName.stripSuffix("$") +} + +/** + * SchemaBinding means the view only tolerates minimal changes to the underlying schema. + * It can tolerate extra columns in SELECT * and upcast to more generic types. + */ +object SchemaBinding extends ViewSchemaMode { + override val toString: String = "BINDING" Review Comment: ```suggestion override def toString: String = "BINDING" ``` since the function body is just a string literal -- 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