You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lens.apache.org by "Rajat Khandelwal (JIRA)" <ji...@apache.org> on 2015/07/20 15:30:04 UTC
[jira] [Created] (LENS-675) Time range merging for queries in lens
Rajat Khandelwal created LENS-675:
-------------------------------------
Summary: Time range merging for queries in lens
Key: LENS-675
URL: https://issues.apache.org/jira/browse/LENS-675
Project: Apache Lens
Issue Type: Bug
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)