srielau commented on code in PR #46267:
URL: https://github.com/apache/spark/pull/46267#discussion_r1595681121
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/SparkSqlParser.scala:
##########
@@ -546,6 +551,13 @@ class SparkSqlAstBuilder extends AstBuilder {
val originalText = source(ctx.query)
assert(Option(originalText).isDefined,
"'originalText' must be provided to create permanent view")
+ val schemaBinding = visitSchemaBinding(ctx.schemaBinding(0))
+ val finalSchemaBinding =
+ if (schemaBinding == SchemaEvolution && userSpecifiedColumns.nonEmpty)
{
+ SchemaTypeEvolution
Review Comment:
I have been going back and forth on this.
If we returned an error, that would preclude a future config default of
EVOLUTION, as it would rquire all views with column list to use an explicit
WITH TYPE EVOLUTION.
If we drive this further on might also argue that we should raise an error
on EVOLUTION without SELECT * in it.
Basically, without SELECT *: EVOLUTION == TYPE EVOLUTION.
Even without all this, I think not returning an error is "nicer", it's not
that there are many choices and we need the users help o decide what they want
us to do.
--
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]