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

    https://github.com/apache/carbondata/pull/1418#discussion_r149997376
  
    --- 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 --
    
    Change name to dbpath in all places 


---

Reply via email to