[
https://issues.apache.org/jira/browse/LENS-675?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14952143#comment-14952143
]
Amareshwari Sriramadasu commented on LENS-675:
----------------------------------------------
[~prongs], I feel time range merging as a feature is not required in lens.
Current way of giving time_range_in clause which are separated by OR or AND
logical separators are sufficient for specification. The logical operators
applied will resolve the range correctly, instead of Lens being intelligent in
the path and converting the range.
If you agree above, can we resolve this feature request ?
> 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
> Affects Versions: 2.0
> 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)