[ 
https://issues.apache.org/jira/browse/LENS-34?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14255560#comment-14255560
 ] 

Jaideep Dhok commented on LENS-34:
----------------------------------

I wrote a simple unit test with the test schema, and it seems that dim only 
queries are indeed going through - 
We can see that summary1 is already selected even though its an aggregated fact.
{noformat}
Query = "select dim1 from testCube where " + twoDaysRange;

Rewritten query = 

SELECT ( testcube . dim1 ) FROM TestQueryRewrite.c1_summary1 testcube WHERE 
(((((((((((((((((((((((((((( testcube . dt ) =  '2014-12-20-14' ) or (( 
testcube . dt ) =  '2014-12-20-15' )) or (( testcube . dt ) =  '2014-12-20-16' 
)) or (( testcube . dt ) =  '2014-12-20-17' )) or (( testcube . dt ) =  
'2014-12-20-18' )) or (( testcube . dt ) =  '2014-12-20-19' )) or (( testcube . 
dt ) =  '2014-12-20-20' )) or (( testcube . dt ) =  '2014-12-20-21' )) or (( 
testcube . dt ) =  '2014-12-20-22' )) or (( testcube . dt ) =  '2014-12-20-23' 
)) or (( testcube . dt ) =  '2014-12-21' )) or (( testcube . dt ) =  
'2014-12-22-00' )) or (( testcube . dt ) =  '2014-12-22-01' )) or (( testcube . 
dt ) =  '2014-12-22-02' )) or (( testcube . dt ) =  '2014-12-22-03' )) or (( 
testcube . dt ) =  '2014-12-22-04' )) or (( testcube . dt ) =  '2014-12-22-05' 
)) or (( testcube . dt ) =  '2014-12-22-06' )) or (( testcube . dt ) =  
'2014-12-22-07' )) or (( testcube . dt ) =  '2014-12-22-08' )) or (( testcube . 
dt ) =  '2014-12-22-09' )) or (( testcube . dt ) =  '2014-12-22-10' )) or (( 
testcube . dt ) =  '2014-12-22-11' )) or (( testcube . dt ) =  '2014-12-22-12' 
)) or (( testcube . dt ) =  '2014-12-22-13' ))))
{noformat}

> dim-attribute query on cube
> ---------------------------
>
>                 Key: LENS-34
>                 URL: https://issues.apache.org/jira/browse/LENS-34
>             Project: Apache Lens
>          Issue Type: Task
>          Components: cube
>            Reporter: Amareshwari Sriramadasu
>            Assignee: Jaideep Dhok
>             Fix For: 2.0
>
>
> If only dim-attributes are queried from cube, cube query rewriter should pick 
>  facts with least weight and even an aggregated fact if the dim-attribute is 
> available in the aggregated fact.
> This issue to verify the above behavior by writing a unit test and fix the 
> behavior if it is different from above.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to