carbondata-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mohammadshahidkhan <...@git.apache.org>
Subject [GitHub] carbondata pull request #1418: [CARBONDATA-1573] [Integration] Support Datab...
Date Fri, 10 Nov 2017 14:31:56 GMT
Github user mohammadshahidkhan commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1418#discussion_r150248692
  
    --- Diff: integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/CarbonDropTableCommand.scala
---
    @@ -80,10 +88,21 @@ case class CarbonDropTableCommand(
       override def processData(sparkSession: SparkSession): Seq[Row] = {
         // delete the table folder
         val dbName = GetDB.getDatabaseName(databaseNameOp, sparkSession)
    -    val tableIdentifier =
    -      AbsoluteTableIdentifier.from(CarbonEnv.getInstance(sparkSession).storePath, dbName,
tableName)
    +    // get the absolute table identifier to drop the table.
    +    val carbonEnv = CarbonEnv.getInstance(sparkSession)
    +    val catalog = carbonEnv.carbonMetastore
    +    val metadataCache = catalog.getTableFromMetadataCache(dbName, tableName)
    +    val absoluteTableIdentifier = metadataCache match {
    +      case Some(tableMeta) =>
    +        tableMeta.carbonTable.getAbsoluteTableIdentifier
    +      case None =>
    +        val storePath = GetDB.getDatabaseLocation(dbName, sparkSession,
    --- End diff --
    
    Fixed


---

Mime
View raw message