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

    
https://github.com/apache/incubator-carbondata/pull/816#discussion_r112972641
  
    --- 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"
    --- End diff --
    
    CarbonEnv.getInstance(sparkSession).carbonMetastore.storePath + 
s"/$dbName/$tableName"


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

Reply via email to