kylin-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "cheney.liu (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (KYLIN-2841) LIMIT is buggy with subquery
Date Thu, 10 May 2018 12:32:00 GMT

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

cheney.liu commented on KYLIN-2841:
-----------------------------------

Hi, Mu Kong

   I wonder to know if this patch is works for you? 

> LIMIT is buggy with subquery
> ----------------------------
>
>                 Key: KYLIN-2841
>                 URL: https://issues.apache.org/jira/browse/KYLIN-2841
>             Project: Kylin
>          Issue Type: Bug
>    Affects Versions: v2.1.0
>            Reporter: Mu Kong
>            Assignee: zhengdong
>            Priority: Major
>              Labels: scope
>         Attachments: 0001-KYLIN-2841-LIMIT-is-buggy-with-subquery.patch
>
>
> Hi, all.
> I found that limit in the web UI seems not behaving as expected.
> When I run a query like the follows:
> {code:sql}
> SELECT
>   SUM(col3) AS col4, 
>   SUM(col5) AS total_col5,
>   col1 
> FROM
> (
>   SELECT
>     col1,
>     col2,
>     MAX(col3) AS col3,
>     COUNT(*) AS col5
>   FROM db.table
>   WHERE col6 = 'somestring'
>   GROUP BY col1, col2
> )
> GROUP BY col1
> {code}
> When I specify the limit as 50, the result has 19 records, and when I specify the limit
as 500000, there are 90+ records in the result and each record has higher col4 and total_col5.
> But for query that doesn't have subquery, the result remains the same no matter how I
change the limit.
> I guess for the query with subquery, limit somehow limits the number of the result from
the inner query instead of the result of the outer query.



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

Mime
View raw message