akashrn5 commented on a change in pull request #3541:
[CARBONDATA-3636]Timeseries query is not hitting datamap if granularity in
query is given case insensitive
URL: https://github.com/apache/carbondata/pull/3541#discussion_r373320221
##########
File path:
datamap/mv/core/src/test/scala/org/apache/carbondata/mv/timeseries/TestMVTimeSeriesCreateDataMapCommand.scala
##########
@@ -210,6 +210,27 @@ class TestMVTimeSeriesCreateDataMapCommand extends
QueryTest with BeforeAndAfter
}.getMessage.contains("MV Timeseries is only supported on Timestamp/Date
column")
}
+ test("test timeseries with case sensitive granularity") {
+ sql("drop datamap if exists datamap1")
+ sql("create datamap datamap1 on table maintable using 'mv'" +
+ " as select timeseries(projectjoindate,'Second'), sum(projectcode) from
maintable group by timeseries(projectjoindate,'Second')")
+ val df1 = sql("select timeseries(projectjoindate,'SECOND'),
sum(projectcode) from maintable group by timeseries(projectjoindate,'SECOND')")
+ val df2 = sql("select timeseries(projectjoinDATE,'SECOnd'),
sum(projectcode) from maintable where projectcode=8 group by
timeseries(projectjoinDATE,'SECOnd')")
+ TestUtil.verifyMVDataMap(df1.queryExecution.analyzed, "datamap1")
+ TestUtil.verifyMVDataMap(df2.queryExecution.analyzed, "datamap1")
+ sql("drop datamap if exists datamap1")
Review comment:
no need to again drop and create datamap, you can use the same with other
query of minute level granularity
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services