Indhumathi27 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_r287934196
##########
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:
done
----------------------------------------------------------------
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:
[hidden email]
With regards,
Apache Git Services