Github user kunal642 commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2535#discussion_r204642515
--- Diff:
integration/spark-common-test/src/test/scala/org/apache/carbondata/integration/spark/testsuite/complexType/TestComplexDataType.scala
---
@@ -885,4 +885,47 @@ class TestComplexDataType extends QueryTest with
BeforeAndAfterAll {
checkExistence(sql("select * from table1"),true,"1.0E9")
}
+ test("test block compaction - auto merge") {
+ sql("DROP TABLE IF EXISTS table1")
+ CarbonProperties.getInstance()
+ .addProperty(CarbonCommonConstants.ENABLE_AUTO_LOAD_MERGE, "true")
+ sql(
+ "create table table1 (roll int,person
Struct<detail:int,age:string,height:double>) stored " +
+ "by 'carbondata'")
+ sql(
+ "load data inpath '" + resourcesPath +
+ "/Struct.csv' into table table1 options('delimiter'=','," +
+
"'quotechar'='\"','fileheader'='roll,person','complex_delimiter_level_1'='$'," +
+ "'complex_delimiter_level_2'='&')")
+ sql(
+ "load data inpath '" + resourcesPath +
+ "/Struct.csv' into table table1 options('delimiter'=','," +
+
"'quotechar'='\"','fileheader'='roll,person','complex_delimiter_level_1'='$'," +
+ "'complex_delimiter_level_2'='&')")
+ sql(
+ "load data inpath '" + resourcesPath +
+ "/Struct.csv' into table table1 options('delimiter'=','," +
+
"'quotechar'='\"','fileheader'='roll,person','complex_delimiter_level_1'='$'," +
+ "'complex_delimiter_level_2'='&')")
+ sql(
+ "load data inpath '" + resourcesPath +
+ "/Struct.csv' into table table1 options('delimiter'=','," +
+
"'quotechar'='\"','fileheader'='roll,person','complex_delimiter_level_1'='$'," +
+ "'complex_delimiter_level_2'='&')")
+ checkExistence(sql("show segments for table table1"),false,
"Compacted")
+ CarbonProperties.getInstance()
+ .addProperty(CarbonCommonConstants.ENABLE_AUTO_LOAD_MERGE, "false")
--- End diff --
add this in afterAll too
---