carbondata-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From QiangCai <...@git.apache.org>
Subject [GitHub] carbondata pull request #1573: [CARBONDATA-1815][PreAgg] Add AtomicRunnableC...
Date Mon, 27 Nov 2017 11:05:32 GMT
Github user QiangCai commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1573#discussion_r153162075
  
    --- Diff: integration/spark2/src/main/scala/org/apache/spark/sql/CarbonEnv.scala ---
    @@ -138,4 +141,35 @@ object CarbonEnv {
           .asInstanceOf[CarbonRelation]
           .carbonTable
       }
    +
    +  def getTablePath(
    +      databaseNameOp: Option[String],
    +      tableName: String
    +  )(sparkSession: SparkSession): String = {
    +    val dbLocation = GetDB.getDatabaseLocation(
    +      databaseNameOp.getOrElse(sparkSession.sessionState.catalog.getCurrentDatabase),
    +      sparkSession,
    +      CarbonProperties.getStorePath)
    +    dbLocation + CarbonCommonConstants.FILE_SEPARATOR + tableName
    +  }
    +
    +  def getDatabaseName(
    +      databaseNameOp: Option[String]
    +  )(sparkSession: SparkSession): String = {
    +    databaseNameOp.getOrElse(sparkSession.sessionState.catalog.getCurrentDatabase)
    +  }
    +  
    +  def getMetastorePath(
    +      databaseNameOp: Option[String],
    +      tableName: String
    +  )(sparkSession: SparkSession): String = {
    +    val absoluteTableIdentifier = AbsoluteTableIdentifier.from(
    +      getTablePath(databaseNameOp, tableName)(sparkSession),
    +      getDatabaseName(databaseNameOp)(sparkSession),
    +      tableName)
    +    val carbonTablePath = CarbonStorePath
    +      .getCarbonTablePath(absoluteTableIdentifier)
    --- End diff --
    
    move to last row


---

Mime
View raw message