[ https://issues.apache.org/jira/browse/KYLIN-2820?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
nichunen reassigned KYLIN-2820: ------------------------------- Assignee: nichunen (was: Roger Shi) > 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 > Assignee: nichunen > Priority: Major > Labels: scope > > 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 (v7.6.14#76016)