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 GitHub Bot (JIRA)" <ji...@apache.org> on 2019/02/27 06:51: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=16778974#comment-16778974 ] 

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

Wayne1c commented on pull request #489: KYLIN-2620 Make the condition stricter to answer query with topN
URL: https://github.com/apache/kylin/pull/489
 
 
   
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> 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: Shaofeng SHI
>            Priority: Major
>             Fix For: v2.6.1
>
>
> 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)