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

ASF subversion and git services commented on KYLIN-4158:
--------------------------------------------------------

Commit 661f5ac4cb938ad881bef4705348c72e8cf4e8ca in kylin's branch 
refs/heads/master from ZhengshuaiPENG
[ https://gitbox.apache.org/repos/asf?p=kylin.git;h=661f5ac ]

#KYLIN-4158, limit not push down to storage scan level if group by is an 
expression


> 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