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

    https://github.com/apache/spark/pull/10733#discussion_r49813930
  
    --- Diff: 
sql/hive/src/main/scala/org/apache/spark/sql/hive/execution/CreateViewAsSelect.scala
 ---
    @@ -44,26 +47,36 @@ private[hive] case class CreateViewAsSelect(
       override def run(sqlContext: SQLContext): Seq[Row] = {
         val hiveContext = sqlContext.asInstanceOf[HiveContext]
     
    -    if (hiveContext.catalog.tableExists(tableIdentifier)) {
    -      if (allowExisting) {
    +    hiveContext.catalog.tableExists(tableIdentifier) match {
    +      case true if allowExisting =>
    --- End diff --
    
    While you are changing this part, how about we add a comment to show the 
sql command that will trigger this case? (also add the comment for `orReplace` 
branch?)


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to