spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clockfly <...@git.apache.org>
Subject [GitHub] spark pull request: [SPARK-6339][SQL][WIP] Supports create CREATE ...
Date Wed, 04 May 2016 03:05:10 GMT
Github user clockfly commented on a diff in the pull request:

    https://github.com/apache/spark/pull/12872#discussion_r61986232
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/execution/command/views.scala ---
    @@ -55,13 +60,18 @@ case class CreateViewCommand(
       require(tableDesc.tableType == CatalogTableType.VIEW)
       require(tableDesc.viewText.isDefined)
     
    -  private val tableIdentifier = tableDesc.identifier
    -
       if (allowExisting && replace) {
         throw new AnalysisException(
           "It is not allowed to define a view with both IF NOT EXISTS and OR REPLACE.")
       }
     
    +  // Temporary view names should NOT contain database prefix like "database.table"
    +  if (isTemporary && tableDesc.identifier.database.isDefined) {
    +    val database = tableDesc.identifier.database.get
    +    throw new AnalysisException(
    --- End diff --
    
    This is to be consistent with DataSet API. When registering a temp table, it will remove
the database prefix, here is the code:
    https://github.com/apache/spark/blob/6ba17cd147277a20a7fbb244c040e694de486c36/sql/core/src/main/scala/org/apache/spark/sql/SparkSession.scala#L533



---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


Mime
View raw message