imback82 commented on pull request #31273:
URL: https://github.com/apache/spark/pull/31273#issuecomment-783861974


   Thanks @cloud-fan for the suggestion. I pushed new changes that do not 
require `View` signature changes. Basically, the following changes are needed:
   1. `TemporaryViewRelation` now stores an optional analyzed plan if the temp 
view is created from dataframe.
   2. `CatalogTable`'s properties now stores `VIEW_CREATED_FROM_DATAFRAME` as a 
key to to differentiate the view create from dataframe.
   
   (On a side note, I first made a change without doing 1), by creating 
`CatalogTable` on the fly in `SessionCatalog`. However, there were tests that 
compare analyzed plans which were failing due to `CatalogTable.createTime` 
difference, so I moved creating `CatalogTable` in `CreateViewCommand.run`. It 
seems that this is a better approach where we can wrap all the temporary views 
with `TemporaryViewRelation` eventually once we also migrate `ALTER VIEW` and 
`CREATE TEMP VIEW USING`.)


----------------------------------------------------------------
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:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to