You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kylin.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2019/06/25 03:59:00 UTC

[jira] [Commented] (KYLIN-2620) Check for "ORDER BY LIMIT" clause when rewrite SUM query as TOPN

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

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

Commit 2bfda2d6c2a19586d0854e487bd3ceb805922940 in kylin's branch refs/heads/2.6.x from chao long
[ https://gitbox.apache.org/repos/asf?p=kylin.git;h=2bfda2d ]

KYLIN-2620 TopN can't match when multi sort columns


> Check for "ORDER BY LIMIT" clause when rewrite SUM query as TOPN
> ----------------------------------------------------------------
>
>                 Key: KYLIN-2620
>                 URL: https://issues.apache.org/jira/browse/KYLIN-2620
>             Project: Kylin
>          Issue Type: Bug
>          Components: Measure - TopN
>            Reporter: Lin Tingmao
>            Assignee: Chao Long
>            Priority: Major
>             Fix For: v3.0.0, v2.6.3
>
>         Attachments: cube_desc.png, sql.png
>
>
> When running the following query
> select sum(measure) from table group by col_id
> if there exists TOPN(measure, group by col_id)  measure, TopNMeasureType.isTopNCompatibleSum()    will pass, so the SUM is rewritten to TOPN. This confuses the user since they may expect a accurate result for every distinct value of group by column(s). 
> Kylin should check if "ORDER BY col_id LIMIT topncapacity" is present in the query to determine whether to rewrite.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)