Github user manishgupta88 commented on a diff in the pull request: https://github.com/apache/carbondata/pull/2109#discussion_r178719972 --- Diff: integration/spark-common-test/src/test/scala/org/apache/carbondata/integration/spark/testsuite/preaggregate/TestPreAggregateCompaction.scala --- @@ -176,6 +179,17 @@ class TestPreAggregateCompaction extends QueryTest with BeforeAndAfterEach with segmentNamesSum.sorted should equal (Array("0", "0.1", "0.2", "1", "2", "3", "4", "5", "6", "7")) } + test("test auto compaction on aggregate table") { + CarbonProperties.getInstance().addProperty(CarbonCommonConstants.ENABLE_AUTO_LOAD_MERGE, "true") + sql(s"LOAD DATA LOCAL INPATH '$testData' into table maintable") + sql(s"LOAD DATA LOCAL INPATH '$testData' into table maintable") + sql(s"LOAD DATA LOCAL INPATH '$testData' into table maintable") + sql(s"LOAD DATA LOCAL INPATH '$testData' into table maintable") + val segmentNamesSum = sql("show segments for table maintable_preagg_sum").collect().map(_.get(0).toString) + segmentNamesSum.sorted should equal (Array("0", "0.1", "1", "2", "3")) + CarbonProperties.getInstance().addProperty(CarbonCommonConstants.ENABLE_AUTO_LOAD_MERGE, "false") --- End diff -- 1. Wrap the test case in try/finally...In case of any failure the property need to be set to default value again else proceeding test cases might fail 2. Replace false with default value from CarbonCommonConstants
---