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

    https://github.com/apache/carbondata/pull/1861#discussion_r165272350
  
    --- Diff: 
integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/datamap/CarbonCreateDataMapCommand.scala
 ---
    @@ -49,10 +52,22 @@ case class CarbonCreateDataMapCommand(
           throw new MalformedCarbonCommandException("Streaming table does not 
support creating datamap")
         }
         val LOGGER = 
LogServiceFactory.getLogService(this.getClass.getCanonicalName)
    +    val dbName = tableIdentifier.database.getOrElse("default")
    +    val tableName = tableIdentifier.table + "_" + dataMapName
     
    -    if (dmClassName.equalsIgnoreCase(PREAGGREGATE.toString) ||
    +    if (sparkSession.sessionState.catalog.listTables(dbName)
    --- End diff --
    
    sparkSession.sessionState.catalog.tableExists(tableIdentifier)


---

Reply via email to