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

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

Unit test code - 
{code}
@Test
  public void testDimAttributeQueryWithFact() throws Exception {
    String query = "select dim1 from testCube where " + twoDaysRange;
    HiveConf conf = new HiveConf(getConf(), TestCubeRewriter.class);
    CubeQueryRewriter cubeQueryRewriter = new CubeQueryRewriter(conf);
    CubeQueryContext ctx = cubeQueryRewriter.rewrite(query);
    String rewrittenQuery = ctx.toHQL();
    System.out.println("##testDimAttributeQueryWithFact " + rewrittenQuery);
  }
{code}

> 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