You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kylin.apache.org by "Billy Liu (JIRA)" <ji...@apache.org> on 2017/08/30 02:50:00 UTC

[jira] [Commented] (KYLIN-2820) Query can't read window function's result from subquery

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

Billy Liu commented on KYLIN-2820:
----------------------------------

Hi [~visualskyrim], could you reproduce this issue from sample cube?

> Query can't read window function's result from subquery
> -------------------------------------------------------
>
>                 Key: KYLIN-2820
>                 URL: https://issues.apache.org/jira/browse/KYLIN-2820
>             Project: Kylin
>          Issue Type: Bug
>    Affects Versions: v2.1.0
>            Reporter: Mu Kong
>
> I executed a query like the follows:
> {code:sql}
> select first_page_name, count(*) as page_name_count from
> (
> select first_value(page_name) over(partition by session_id) as first_page_name from some_db.some_table
> ) group by first_page_name;
> {code}
> This query resulted in one single record with an empty string as the first_page_name, and a big number as the page_name_count.
> However, when I ran the subquery without the outer query, it resulted in multiple records with different first_page_name, which proved the query above was wrong.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)