Github user ravipesala commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/1490#discussion_r150812888
--- Diff:
integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/datamap/TestDataMapCommand.scala
---
@@ -81,8 +82,25 @@ class TestDataMapCommand extends QueryTest with
BeforeAndAfterAll {
assert(dataMapSchemaList.size() == 3)
}
+ test("test show datamap without preaggregate") {
+ sql("drop table if exists datamapshowtest")
+ sql("create table datamapshowtest (a string, b string, c string)
stored by 'carbondata'")
+ sql("create datamap datamap1 on table datamapshowtest using
'new.class' dmproperties('key'='value')")
+ sql("create datamap datamap2 on table datamapshowtest using
'new.class' dmproperties('key'='value')")
+ checkExistence(sql("show datamap on table datamapshowtest"), true,
"datamap1", "datamap2", "-NA-", "new.class")
+ }
+
+ test("test show datamap with preaggregate") {
+ sql("drop table if exists datamapshowtest")
+ sql("create table datamapshowtest (a string, b string, c string)
stored by 'carbondata'")
+ sql("create datamap datamap1 on table datamapshowtest using
'preaggregate' as select count(a) from datamapshowtest")
+ sql("create datamap datamap2 on table datamapshowtest using
'new.class' dmproperties('key'='value')")
+ checkExistence(sql("show datamap on table datamapshowtest"), true,
"datamap1", "datamap2", "-NA-", "new.class", "default.datamap1")
+ }
+
--- End diff --
added
---