Github user ravipesala commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/1835#discussion_r162550560
--- Diff:
integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/datamap/TestDataMapCommand.scala
---
@@ -207,6 +209,26 @@ class TestDataMapCommand extends QueryTest with
BeforeAndAfterAll {
Seq(Row(1, 31), Row(2, 27), Row(3, 70), Row(4, 55)))
}
+ test("create pre-agg table with path") {
+ sql("drop table if exists maintbl_preagg")
+ sql("drop table if exists maintbl ")
+ val path = "./_pre-agg_test"
+ try {
+ sql("create table maintbl(year int,month int,name string,salary int)
stored by 'carbondata' tblproperties('sort_columns'='month,year,name')")
+ sql("insert into maintbl select 10,11,'amy',12")
+ sql("insert into maintbl select 10,11,'amy',12")
+ sql("create datamap preagg on table maintbl " +
+ "using 'preaggregate' " +
+ s"dmproperties ('path'='$path') " +
+ "as select name,avg(salary) from maintbl group by name")
+ assertResult(true)(new File(path).exists())
--- End diff --
Check the datafles are present inside the path or not
---