You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kylin.apache.org by 翟鹿渊 <di...@163.com> on 2016/12/08 02:13:39 UTC
sql query(min/max over) seems to be replicated
Hi Kylin Dev team,
I used a dataset called learn_kylin, the sample data of table kylin_sales looks like:
A problem came when I inputed sql query as: " 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" then replicated results returned. They look like:
How does this happen and if there is any way to solve it?
Thank you!
Luyuan(Adora)
Re: sql query(min/max over) seems to be replicated
Posted by Li Yang <li...@apache.org>.
It looks like a bug. You can create a JIRA and develop will fix.
On Thu, Dec 8, 2016 at 10:13 AM, 翟鹿渊 <di...@163.com> wrote:
> Hi Kylin Dev team,
>
> I used a dataset called learn_kylin, the sample data of table kylin_sales
> looks like:
>
> A problem came when I inputed sql query as: " 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" then replicated
> results returned. They look like:
>
> How does this happen and if there is any way to solve it?
> Thank you!
>
> Luyuan(Adora)
>
>
>
>
>
>
>
Re: sql query(min/max over) seems to be replicated-more info
Posted by Li Yang <li...@apache.org>.
On a second look, since the query does not ends with a group by " from
kylin_sales". The result seems reasonable.
On Thu, Dec 8, 2016 at 10:43 AM, 翟鹿渊 <di...@163.com> wrote:
> It seems the images cannot be present. So I grabbed part of tables
> mentioned.
> >>Table structure looks as:
>
> | 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 |
>
>
>
> >>(Part)Results returned as:
>
> | 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 |
> | Others | 49.2756 | 186.9764 | 0.0232 |
> | Others | 49.2756 | 186.9764 | 0.0232 |
> | Others | 49.2756 | 186.9764 | 0.0232 |
> | Others | 49.2756 | 186.9764 | 0.0232 |
> | Others | 49.2756 | 186.9764 | 0.0232 |
> | Others | 49.2756 | 186.9764 | 0.0232 |
> | Others | 49.2756 | 186.9764 | 0.0232 |
> | Others | 49.2756 | 186.9764 | 0.0232 |
>
>
> Does it look more detailed?
>
> Best,
> Luyuan(Adora)
>
>
> At 2016-12-08 10:13:39, "翟鹿渊" <di...@163.com> wrote:
>
> Hi Kylin Dev team,
>
> I used a dataset called learn_kylin, the sample data of table kylin_sales
> looks like:
>
> A problem came when I inputed sql query as: " 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" then replicated results
> returned. They look like:
>
>
> How does this happen and if there is any way to solve it?
> Thank you!
>
> Luyuan(Adora)
>
>
>
>
>
>
>
>
>
>
>
Re:sql query(min/max over) seems to be replicated-more info
Posted by 翟鹿渊 <di...@163.com>.
It seems the images cannot be present. So I grabbed part of tables mentioned.
>>Table structure looks as:
| 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 |
>>(Part)Results returned as:
| 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 |
| Others | 49.2756 | 186.9764 | 0.0232 |
| Others | 49.2756 | 186.9764 | 0.0232 |
| Others | 49.2756 | 186.9764 | 0.0232 |
| Others | 49.2756 | 186.9764 | 0.0232 |
| Others | 49.2756 | 186.9764 | 0.0232 |
| Others | 49.2756 | 186.9764 | 0.0232 |
| Others | 49.2756 | 186.9764 | 0.0232 |
| Others | 49.2756 | 186.9764 | 0.0232 |
Does it look more detailed?
Best,
Luyuan(Adora)
At 2016-12-08 10:13:39, "翟鹿渊" <di...@163.com> wrote:
Hi Kylin Dev team,
I used a dataset called learn_kylin, the sample data of table kylin_sales looks like:
A problem came when I inputed sql query as: " 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" then replicated results returned. They look like:
How does this happen and if there is any way to solve it?
Thank you!
Luyuan(Adora)