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

    
https://github.com/apache/incubator-carbondata/pull/816#discussion_r112974468
  
    --- Diff: 
integration/spark2/src/main/scala/org/apache/spark/sql/CarbonSource.scala ---
    @@ -184,4 +194,29 @@ class CarbonSource extends CreatableRelationProvider 
with RelationProvider
         }
       }
     
    +  /**
    +   * Returns the path of the table
    +   * @param sparkSession
    +   * @param dbName
    +   * @param tableName
    +   * @return
    +   */
    +  private def getPathForTable(sparkSession: SparkSession, dbName: String,
    +      tableName : String): String = {
    +
    +    if (StringUtils.isBlank(tableName)) {
    +      throw new MalformedCarbonCommandException("The Specified Table Name 
is Blank")
    +    }
    +    if (tableName.contains(" ")) {
    +      throw new MalformedCarbonCommandException("Table Name Should not 
have spaces ")
    +    }
    +    try {
    +      CarbonEnv.get.carbonMetastore.lookupRelation(Option(dbName), 
tableName)(sparkSession)
    +      CarbonEnv.get.carbonMetastore.storePath + s"/$dbName/$tableName"
    +    } catch {
    +      case ex: Exception =>
    +        throw new Exception(s"do not have $dbName and $tableName for 
carbon table", ex)
    --- End diff --
    
    How about : 
    throw new Exception(s"Do not have $dbName and $tableName", ex)


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

Reply via email to