Github user xubo245 commented on a diff in the pull request: https://github.com/apache/carbondata/pull/2940#discussion_r238166894 --- Diff: integration/spark-common-test/src/test/scala/org/apache/carbondata/integration/spark/testsuite/preaggregate/TestPreAggCreateCommand.scala --- @@ -463,6 +464,39 @@ class TestPreAggCreateCommand extends QueryTest with BeforeAndAfterAll { executorService.shutdown() } + test("support set carbon.query.directQueryOnDataMap.enabled=true") { + val rootPath = new File(this.getClass.getResource("/").getPath + + "../../../..").getCanonicalPath + val testData = s"$rootPath/integration/spark-common-test/src/test/resources/sample.csv" + sql("drop table if exists mainTable") + sql( + s""" + | CREATE TABLE mainTable + | (id Int, + | name String, + | city String, + | age Int) + | STORED BY 'org.apache.carbondata.format' + """.stripMargin); + + + sql( + s""" + | LOAD DATA LOCAL INPATH '$testData' + | into table mainTable + """.stripMargin); + + sql( + s""" + | create datamap preagg_sum on table mainTable + | using 'preaggregate' + | as select id,sum(age) from mainTable group by id + """.stripMargin); + + sql("set carbon.query.directQueryOnDataMap.enabled=true"); --- End diff -- ok, optimized it. Why don't we use the default value for test?
---