viirya commented on pull request #31811:
URL: https://github.com/apache/spark/pull/31811#issuecomment-799688317


   > create table t(a int)
   create view v as select *, col from t
   replace table t(a int, col int)
   
   How does it work?
   
   ```
   scala> sql("create view v as select *, col from t")                          
                                      
   org.apache.spark.sql.AnalysisException: cannot resolve '`col`' given input 
columns: [spark_catalog.default.t.a]; line 1 pos 27;
   'CreateViewStatement [v], select *, col from t, false, false, PersistedView
   +- 'Project [a#0, 'col]
      +- SubqueryAlias spark_catalog.default.t
         +- HiveTableRelation [`default`.`t`, 
org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, Data Cols: [a#0], Partition 
Cols: []]
   ```
   


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

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