[ 
https://issues.apache.org/jira/browse/LENS-905?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sushil Mohanty updated LENS-905:
--------------------------------
    Description: 
Cube rewriter rewrites query with distinct if only keys are projected and 
having specified. Instead it should promote group by with projected columns.

for eg.
cube select key1 from table having msr1 > 0 
is being rewritten to "select distinct key1 from table having sum(msr1) > 0 " 
but it supposed to be rewritten to 
"select key1 from table group by key1 having sum(msr1) > 0"


  was:
Cube rewriter rewrites query with distinct if only keys are projected and 
having specified. Instead it should promote group by with projected columns.

for eg.
select key1 from table having msr1 > 0 
is being rewritten to "select distinct key1 from table having msr1 > 0 " but it 
supposed to be rewritten to 
"select key1 from table group by key1 having msr1 > 0"



> Group by is not promoted when keys projected along with having clause
> ---------------------------------------------------------------------
>
>                 Key: LENS-905
>                 URL: https://issues.apache.org/jira/browse/LENS-905
>             Project: Apache Lens
>          Issue Type: Bug
>          Components: cube
>            Reporter: Sushil Mohanty
>            Assignee: Sushil Mohanty
>             Fix For: 2.5
>
>
> Cube rewriter rewrites query with distinct if only keys are projected and 
> having specified. Instead it should promote group by with projected columns.
> for eg.
> cube select key1 from table having msr1 > 0 
> is being rewritten to "select distinct key1 from table having sum(msr1) > 0 " 
> but it supposed to be rewritten to 
> "select key1 from table group by key1 having sum(msr1) > 0"



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

Reply via email to