Mu Kong created KYLIN-2820:
------------------------------

             Summary: 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)

Reply via email to