You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@kylin.apache.org by han cheryl <cr...@gmail.com> on 2017/09/19 08:35:20 UTC

Are there any restrictions on the query conditions for where?

HI everyone:
I run sample.sh and it success.
i can use sql like this
select part_dt, sum(price) as total_selled, count(distinct seller_id) as
sellers from kylin_sales group by part_dt order by part_dt
i got the result.


but when i use sql like this .its show
Error while executing SQL "select part_dt, sum(price) as total_selled,
count(distinct seller_id) as sellers from kylin_sales where price > 100
group by part_dt order by part_dt LIMIT 50": No realization found for
rel#2648:OLAPTableScan.OLAP.[](table=[DEFAULT, KYLIN_SALES],fields=[0, 1,
2, 3, 4, 5, 6, 7, 8, 9, 10, 11])

select part_dt, sum(price) as total_selled, count(distinct seller_id) as
sellers from kylin_sales  where price > 100 group by part_dt order by
part_dt

Re: Are there any restrictions on the query conditions for where?

Posted by han cheryl <cr...@gmail.com>.
thx 发自网易邮箱大师 在2017年09月19日 17:51,ShaoFeng Shi 写道: yes, the measure column (e.g "price" here) couldn't be used in "where" clause. All columns used in "where" need be defined as dimensions in the Cube. 2017-09-19 16:35 GMT+08:00 han cheryl <cr...@gmail.com>: HI everyone: I run sample.sh and it success. i can use sql like this select part_dt, sum(price) as total_selled, count(distinct seller_id) as sellers from kylin_sales group by part_dt order by part_dt i got the result. but when i use sql like this .its show  Error while executing SQL "select part_dt, sum(price) as total_selled, count(distinct seller_id) as sellers from kylin_sales where price > 100 group by part_dt order by part_dt LIMIT 50": No realization found for rel#2648:OLAPTableScan.OLAP.[](table=[DEFAULT, KYLIN_SALES],fields=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]) select part_dt, sum(price) as total_selled, count(distinct seller_id) as sellers from kylin_sales  where price > 100 group by part_dt order by part_dt -- Best regards, Shaofeng Shi 史少锋

Re: Are there any restrictions on the query conditions for where?

Posted by ShaoFeng Shi <sh...@apache.org>.
yes, the measure column (e.g "price" here) couldn't be used in "where"
clause. All columns used in "where" need be defined as dimensions in the
Cube.

2017-09-19 16:35 GMT+08:00 han cheryl <cr...@gmail.com>:

> HI everyone:
> I run sample.sh and it success.
> i can use sql like this
> select part_dt, sum(price) as total_selled, count(distinct seller_id) as
> sellers from kylin_sales group by part_dt order by part_dt
> i got the result.
>
>
> but when i use sql like this .its show
> Error while executing SQL "select part_dt, sum(price) as total_selled,
> count(distinct seller_id) as sellers from kylin_sales where price > 100
> group by part_dt order by part_dt LIMIT 50": No realization found for
> rel#2648:OLAPTableScan.OLAP.[](table=[DEFAULT, KYLIN_SALES],fields=[0, 1,
> 2, 3, 4, 5, 6, 7, 8, 9, 10, 11])
>
> select part_dt, sum(price) as total_selled, count(distinct seller_id) as
> sellers from kylin_sales  where price > 100 group by part_dt order by
> part_dt
>



-- 
Best regards,

Shaofeng Shi 史少锋