You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by liancheng <gi...@git.apache.org> on 2016/06/10 21:41:10 UTC

[GitHub] spark pull request #13572: [SPARK-15862] [SQL] Better Error Message When Hav...

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

    https://github.com/apache/spark/pull/13572#discussion_r66684973
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/execution/command/cache.scala ---
    @@ -17,30 +17,30 @@
     
     package org.apache.spark.sql.execution.command
     
    -import org.apache.spark.sql.{Dataset, Row, SparkSession}
    +import org.apache.spark.sql.{AnalysisException, Dataset, Row, SparkSession}
    +import org.apache.spark.sql.catalyst.TableIdentifier
     import org.apache.spark.sql.catalyst.expressions.Attribute
     import org.apache.spark.sql.catalyst.plans.QueryPlan
     import org.apache.spark.sql.catalyst.plans.logical.LogicalPlan
     
     case class CacheTableCommand(
    -  tableName: String,
    -  plan: Option[LogicalPlan],
    -  isLazy: Boolean)
    -  extends RunnableCommand {
    +    tableIdent: TableIdentifier,
    +    plan: Option[LogicalPlan],
    +    isLazy: Boolean) extends RunnableCommand {
    --- End diff --
    
    IIUC, we can add an assertion here saying that when `plan` is defined, `tableIdent.database` must be either `None` or `Some("default")`, right?


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