[
https://issues.apache.org/jira/browse/LENS-675?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Amareshwari Sriramadasu updated LENS-675:
-----------------------------------------
Component/s: cube
Issue Type: Improvement (was: Bug)
> Time range merging for queries in lens
> --------------------------------------
>
> Key: LENS-675
> URL: https://issues.apache.org/jira/browse/LENS-675
> Project: Apache Lens
> Issue Type: Improvement
> Components: cube
> Reporter: Rajat Khandelwal
>
> Assume I have two time dimensions: time_dim1 and time_dim2. With part cols:
> td1 and td2
> And facts are available for each granularity between hourly, daily and
> monthly.
> Now I issue a query like "cube select fields from cube where
> time_range_in(time_dim1, '2015-07-01', '2015-07-10') and
> time_range_in(time_dim1, '2015-07-01', '2015-07-02') and
> time_range_in(time_dim1, '2015-07-01-00', '2015-07-01-01')
> Then the picked partitions in hql come out to be:
> {noformat}
> WHERE ((((( cube.td1 ) in ( '2015-07-01' , '2015-07-02' , '2015-07-03' ,
> '2015-07-04' , '2015-07-05' , '2015-07-06' , '2015-07-07' ,
> '2015-07-08' , '2015-07-09' ) and ( cube.td1 ) in ( '2015-07-01' )) and (
> cube.td1 ) in ( '2015-07-01-00' ))))
> {noformat}
> Now this query returns NULL result since no actual partitions are picked
> through this condition.
> Another issue with two time dimensions:
> In the time ranges, one range is provided at hourly granularity and another
> at daily granularity, then partitions can not be picked.
> {noformat}
> where time_range_in(time_dim1, '2015-07-01-00', '2015-07-01-01') and
> time_range_in(time_dim2, '2015-07-01', '2015-07-02')
> {noformat}
> For multiple time ranges, it should be checked which granularities for time
> dims coexist.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)