You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kylin.apache.org by "bin.li (JIRA)" <ji...@apache.org> on 2016/03/27 08:06:25 UTC

[jira] [Created] (KYLIN-1535) error results when add limit at end of sql with sub query

bin.li created KYLIN-1535:
-----------------------------

             Summary: error results when add limit at end of sql with sub query
                 Key: KYLIN-1535
                 URL: https://issues.apache.org/jira/browse/KYLIN-1535
             Project: Kylin
          Issue Type: Bug
          Components: Query Engine
    Affects Versions: v1.2
         Environment: kylin-1.2, hive0.13.0, hbase0.98.6
            Reporter: bin.li
            Assignee: liyang


The sql :
select channel_id,count(*) as shopper
from
(
select shopper_id, channel_id, count(*)
from ods.ods_mobile_api
where "DAY" = '20160315'
group by shopper_id,channel_id
) as t
group by channel_id
order by shopper desc
limit 10
;

This sql cannot get the same result with hive(hive is right), and if I remove limit 10 at the end of  the sql, I can get the right result.

This is not expected, because I add limit at the end of my sql, not in sub query.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)