You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@carbondata.apache.org by GitBox <gi...@apache.org> on 2019/05/28 01:26:18 UTC

[GitHub] [carbondata] qiuchenjian commented on a change in pull request #3241: [HOTFIX] Fix block complex data type and validate dmproperties for MV

qiuchenjian commented on a change in pull request #3241: [HOTFIX] Fix block complex data type and validate dmproperties for MV
URL: https://github.com/apache/carbondata/pull/3241#discussion_r287903176
 
 

 ##########
 File path: datamap/mv/core/src/test/scala/org/apache/carbondata/mv/rewrite/MVIncrementalLoadingTestcase.scala
 ##########
 @@ -545,6 +544,29 @@ class MVIncrementalLoadingTestcase extends QueryTest with BeforeAndAfterAll {
     sql("drop table IF EXISTS main_table")
   }
 
+  test("test compaction on main table and rebuild") {
+    createTableFactTable("test_table")
+    loadDataToFactTable("test_table")
+    sql("drop datamap if exists datamap1")
+    sql(
+      "create datamap datamap1 using 'mv'  with deferred rebuild  as select empname, designation " +
+      "from test_table")
+    loadDataToFactTable("test_table")
+    loadDataToFactTable("test_table")
+    sql(s"rebuild datamap datamap1")
+    sql("alter table test_table compact 'major'")
+    sql(s"rebuild datamap datamap1")
+    val dataMapTable = CarbonMetadata.getInstance().getCarbonTable(
+      CarbonCommonConstants.DATABASE_DEFAULT_NAME,
+      "datamap1_table")
+    val loadMetadataDetails = SegmentStatusManager.readLoadMetadata(dataMapTable.getMetadataPath)
+    assert(loadMetadataDetails.length == 1)
+    var segmentMap = DataMapSegmentStatusUtil.getSegmentMap(loadMetadataDetails(0).getExtraInfo)
+    val segmentList = new java.util.ArrayList[String]()
+    segmentList.add("0.1")
+    assert(segmentList.containsAll(segmentMap.get("default.test_table")))
+  }
+
 
 Review comment:
   better to optimize ```verifyMVDataMap```, every test file has this method

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services