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

    https://github.com/apache/carbondata/pull/1743#discussion_r159396427
  
    --- Diff: 
integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/datamap/TestDataMapCommand.scala
 ---
    @@ -76,6 +78,24 @@ class TestDataMapCommand extends QueryTest with 
BeforeAndAfterAll {
         
assert(dataMapSchemaList.get(2).getChildSchema.getTableName.equals("datamaptest_datamap3"))
       }
     
    +  test("check hivemetastore after drop datamap") {
    +    
CarbonProperties.getInstance().addProperty(CarbonCommonConstants.ENABLE_HIVE_SCHEMA_META_STORE,
    +      "true")
    +    sql("drop datamap if exists datamap_hiveMetaStoreTable on table 
hiveMetaStoreTable")
    +    sql("drop table if exists hiveMetaStoreTable")
    +    sql("create table hiveMetaStoreTable (a string, b string, c string) 
stored by 'carbondata'")
    +    sql(
    +      "create datamap datamap_hiveMetaStoreTable on table 
hiveMetaStoreTable using 'preaggregate' dmproperties('key'='value') as select 
count(a) from hiveMetaStoreTable")
    +
    +    val table = CarbonMetadata.getInstance().getCarbonTable("default", 
"hiveMetaStoreTable")
    +    var dataMapSchemaList = table.getTableInfo.getDataMapSchemaList
    +    assert(dataMapSchemaList.size() == 1)
    +
    +    sql("drop datamap if exists datamap_hiveMetaStoreTable on table 
hiveMetaStoreTable")
    --- End diff --
    
    drop main table also


---

Reply via email to