You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kylin.apache.org by "Luyuan Zhai (JIRA)" <ji...@apache.org> on 2016/12/08 09:10:58 UTC

[jira] [Updated] (KYLIN-2258) sql query(avg/min/max over) result turns to be replicated

     [ https://issues.apache.org/jira/browse/KYLIN-2258?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Luyuan Zhai updated KYLIN-2258:
-------------------------------
    Attachment: sample_data.png

A sample data image

> sql query(avg/min/max over) result turns to be replicated
> ---------------------------------------------------------
>
>                 Key: KYLIN-2258
>                 URL: https://issues.apache.org/jira/browse/KYLIN-2258
>             Project: Kylin
>          Issue Type: Bug
>          Components: Query Engine
>         Environment: windows
>            Reporter: Luyuan Zhai
>            Assignee: liyang
>            Priority: Minor
>         Attachments: sample_data.png
>
>
> Situation: I inputed sql query following then results turned right yet with duplicates. It seems the over(partition by clause) doesn't work.
> >>data source:learn_kylin
> table kylin_sales looks like:
>  
> Row | TRANS_ID | PART_DT | LSTG_FORMAT_NAME | LEAF_CATEG_ID | LSTG_SITE_ID | SLR_SEGMENT_CD | PRICE | ITEM_COUNT | SELLER_ID | USER_ID | REGION |
> | 1 | 0 | 2012-12-14 | Others | 88750 | 0 | 11 | 36.2828 | 0 | 10000349 | ANALYST | Beijing |
> >>sql query like:
> select LSTG_FORMAT_NAME, avg(price) over(partition by LSTG_FORMAT_NAME) as price_level, max(price) over(partition by LSTG_FORMAT_NAME) as price_max, min(price) over(partition by LSTG_FORMAT_NAME) as price_min from kylin_sales
> >>results returns as: (you can find this file attached)
> LSTG_FORMAT_NAME	PRICE_LEVEL	PRICE_MAX	PRICE_MIN
> FP-non GTC	49.81376	145.495	0.0537
> FP-non GTC	49.81376	145.495	0.0537
> FP-non GTC	49.81376	145.495	0.0537
> FP-non GTC	49.81376	145.495	0.0537
> FP-non GTC	49.81376	145.495	0.0537
> FP-non GTC	49.81376	145.495	0.0537
> FP-non GTC	49.81376	145.495	0.0537
> FP-non GTC	49.81376	145.495	0.0537
> FP-non GTC	49.81376	145.495	0.0537
> FP-non GTC	49.81376	145.495	0.0537
> FP-non GTC	49.81376	145.495	0.0537
> FP-non GTC	49.81376	145.495	0.0537
> FP-non GTC	49.81376	145.495	0.0537
> FP-non GTC	49.81376	145.495	0.0537
> FP-non GTC	49.81376	145.495	0.0537
> FP-non GTC	49.81376	145.495	0.0537
> FP-non GTC	49.81376	145.495	0.0537



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