carbondata-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kunal642 <...@git.apache.org>
Subject [GitHub] carbondata pull request #1443: [CARBONDATA-1524][CARBONDATA-1525][AggTable] ...
Date Fri, 10 Nov 2017 10:12:45 GMT
Github user kunal642 commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1443#discussion_r150197463
  
    --- Diff: integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/CarbonDropTableCommand.scala
---
    @@ -60,33 +62,40 @@ case class CarbonDropTableCommand(
             lock => carbonLocks += CarbonLockUtil.getLockObject(carbonTableIdentifier,
lock)
           }
           LOGGER.audit(s"Deleting table [$tableName] under database [$dbName]")
    -
    -      // fires the event before dropping main table
    -      val carbonTable = CarbonMetadata.getInstance.getCarbonTable(dbName + "_" + tableName)
    +      val carbonTable: Option[CarbonTable] = try {
    +        Some(catalog.lookupRelation(identifier)(sparkSession)
    +          .asInstanceOf[CarbonRelation].metaData.carbonTable)
    +      } catch {
    +        case ex: NoSuchTableException =>
    +          if (!ifExistsSet) {
    +            throw ex
    +          }
    +          None
    +      }
           val operationContext = new OperationContext
           val dropTablePreEvent: DropTablePreEvent =
             DropTablePreEvent(
    -          carbonTable,
    +          carbonTable.get,
    --- End diff --
    
    @fixed


---

Mime
View raw message