Github user gatorsmile commented on a diff in the pull request:

    https://github.com/apache/spark/pull/14746#discussion_r76641967
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/command/views.scala ---
    @@ -105,7 +96,14 @@ case class CreateViewCommand(
         }
         val sessionState = sparkSession.sessionState
     
    -    if (isTemporary) {
    +    // 1) CREATE VIEW: create a temp view when users explicitly specify 
the keyword TEMPORARY;
    +    //                 otherwise, create a permanent view no matter 
whether the temporary view
    +    //                 with the same name exists or not.
    +    // 2) ALTER VIEW: alter the temporary view if the temp view exists; 
otherwise, try to alter
    +    //                the permanent view. Here, it follows the same 
resolution like DROP VIEW,
    +    //                since users are unable to specify the keyword 
TEMPORARY.
    +    if (viewType == ViewType.Temporary ||
    +        (viewType != ViewType.Permanent && 
sessionState.catalog.isTemporaryTable(name))) {
    --- End diff --
    
    Sure, let me change it. Thanks!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to