Can't create EnumerableAggregate! with cte in where condition

2018-10-14 Thread yiwang
Hello kylin team, I got a error: " Can't create EnumerableAggregate! while executing SQL: "with cte1 as( select * from (select * from kylin_sales) where seller_id <> 0 ), cte2 as( select distinct trans_id from kylin_sales where trans_id <> 0 ) select part_dt, sum(price) as total_selled, count(dist

UNION ALL is not working with count()

2018-10-14 Thread yiwang
Hi Kylin Team, When I ran sql "SELECT count(TRANS_ID) as TRANS_ID FROM KYLIN_SALES where TRANS_ID <> 1 union all select count(TRANS_ID) as TRANS_ID FROM KYLIN_SALES" on sample cube. Got Error: Error while compiling generated Java code: public static class Record2_1 implements java.io.Serializable

Derived column from windowSpec not working in where

2018-10-22 Thread yiwang
Hello Kylin Team, When I ran " with subOrder1 as ( select MEMBERID as groupColumn, row_number() over(partition by SUBSCRIBERFLAG order by SUBSCRIBERFLAG Asc) rn1 from TBLPFTEST500W_SMALL) select groupColumn, rn1 from subOrder1 where rn1 = 1" I got a error: " -1 while executing SQL: "with subOr

"null" error returned when run sql with cte join cte

2018-10-30 Thread yiwang
Hello Kylin Team, Error: null while executing SQL: "with aa as ( select lstg_format_name, count( distinct buyer_id ) as temp from ( select * from kylin_sales ) _view_ where ops_region = 'Shanghai' group by lstg_format_name ), bb as ( select lstg_format_name from ( select * from kylin_sales ) _view

Filter return error when using " = " for Integer column type

2018-11-13 Thread yiwang
Hello Kylin Team, In sample cube, data type of BUYER_ID is Integer. select * from KYLIN_SALES where "BUYER_ID" = '1002' this query works in db,but failed in kylin, Error detail as below. Error while compiling generated Java code: org.apache.calcite.DataContext root; public org.apache.c

Re: 答复: Filter return error when using " = " for Integer column type

2018-11-14 Thread yiwang
hello, I followed your guide and modified sql to "select BUYER_ID from KYLIN_SALES where BUYER_ID = '1002' group by BUYER_ID" got the similar error. Error while compiling generated Java code: org.apache.calcite.DataContext root; public org.apache.calcite.linq4j.Enumerable bind(final org.ap

which cube is response for query when 2 models has different filters in 1 datasource table?

2018-12-20 Thread yiwang
Hello kylin team; for example, I created 2 Models using sample table: "KYLIN_SALES". Model: Test1 has filter seller_id=1994, Test2 has filter seller_id=1998 then I built 2 cubes for each model, get a valid table for query: KYLIN_SALES when i execute sql: select SELLER_ID,count(*) from KYLI