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

ASF GitHub Bot commented on KYLIN-4158:
---------------------------------------

nichunen commented on pull request #827: #KYLIN-4158, limit not push down to 
storage scan level if group by is…
URL: https://github.com/apache/kylin/pull/827
 
 
   
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Query failed for GroupBy an expression of column with limit in SQL
> ------------------------------------------------------------------
>
>                 Key: KYLIN-4158
>                 URL: https://issues.apache.org/jira/browse/KYLIN-4158
>             Project: Kylin
>          Issue Type: Bug
>          Components: Query Engine
>    Affects Versions: v2.6.2
>            Reporter: PENG Zhengshuai
>            Assignee: PENG Zhengshuai
>            Priority: Major
>
> When executing a sql query, the limit should not be pushdown to storage scan 
> level if group by clause is an expression of columns.
> For example:
> {code:java}
> SELECT (CASE WHEN ("TEST_KYLIN_FACT"."LSTG_FORMAT_NAME" IN ('Auction', 
> 'FP-GTC')) THEN 'Auction' ELSE "TEST_KYLIN_FACT"."LSTG_FORMAT_NAME" END) AS 
> "LSTG_FORMAT_NAME__group_",
>   SUM("TEST_KYLIN_FACT"."PRICE") AS "sum_PRICE_ok"
> FROM "TEST_KYLIN_FACT" "TEST_KYLIN_FACT"
> GROUP BY (CASE WHEN ("TEST_KYLIN_FACT"."LSTG_FORMAT_NAME" IN ('Auction', 
> 'FP-GTC')) THEN 'Auction' ELSE "TEST_KYLIN_FACT"."LSTG_FORMAT_NAME" END)
> limit 4
> {code}
> In this SQL, group by clause is an expression, the limit should NOT be 
> push-down to storage scan level, otherwise, the result is incorrect



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

Reply via email to