You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kylin.apache.org by "Yaqian Zhang (Jira)" <ji...@apache.org> on 2019/09/19 08:24: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=16933160#comment-16933160 ]
Yaqian Zhang commented on KYLIN-2820:
-------------------------------------
Verified.
!image-2019-09-19-16-23-39-972.png|width=300,height=189!
> 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
> Fix For: v3.0.0-beta
>
> Attachments: image-2019-09-19-16-23-39-972.png
>
>
> 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
(v8.3.4#803005)