kylin-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 张天生 <zhtsh.lic...@gmail.com>
Subject Re: TOP-N query always return 0 records
Date Wed, 10 Aug 2016 03:53:41 GMT
Sql: "select ADX,GEOID,SUM(IMPS) as imps,SUM(CLKS) as clks,SUM(CONS) as
cons,SUM(IMP_CLOSINGPRICE)+SUM(CLK_CLOSINGPRICE) as cost,COUNT(DISTINCT
IMP_DEVICEID) as imp_uv,COUNT(DISTINCT CLK_DEVICEID) as clk_uv from
EXT_MID_EVENT_JOIN where "DATE">=DATE'2016-01-01' and
"DATE"<DATE'2016-01-08' group by ADX,GEOID order by cost limit 100"
The following error information appeared:
Error while executing SQL "select ADX,GEOID,SUM(IMPS) as imps,SUM(CLKS) as
clks,SUM(CONS) as cons,SUM(IMP_CLOSINGPRICE)+SUM(CLK_CLOSINGPRICE) as
cost,COUNT(DISTINCT IMP_DEVICEID) as imp_uv,COUNT(DISTINCT CLK_DEVICEID) as
clk_uv from EXT_MID_EVENT_JOIN where "DATE">=DATE'2016-01-01' and
"DATE"<DATE'2016-01-08' group by ADX,GEOID order by cost limit 100": For
input string: "1451606400000"
Is it DATE'2016-01-01' returned a string, however DATE is a integer type,
the type is not match?

张天生 <zhtsh.lichao@gmail.com>于2016年8月9日周二 下午6:45写道:

> Ok, i will try it.
>
> ShaoFeng Shi <shaofengshi@apache.org>于2016年8月9日周二 下午6:36写道:
>
>> The "date" encoding is better than "dic" encoding as it doesn't need
>> storage cost.
>>
>> Did you try this (explicitly let SQL parser know it is a Date value): where
>> "DATE">=DATE'2016-01-01'
>>
>> 2016-08-09 17:38 GMT+08:00 张天生 <zhtsh.lichao@gmail.com>:
>>
>>> I found the answer, it because DATE dimension rowkey encode is date.
>>> When executes "select APPID, SUM(IMPS) as imps from EXT_MID_EVENT_JOIN
>>> where "DATE">=1462060800000 and "DATE"<1462147200000 group by APPID order
>>> by imps desc limit 100", it returned right results. Btw, whether the date
>>> rowkey encode is better performace than dictionary encode?
>>>
>>> 张天生 <zhtsh.lichao@gmail.com>于2016年8月9日周二 下午3:55写道:
>>>
>>>> I built a cube, it has 2 dimesions : CAMPAIGNID, DATE, and has 2
>>>> measures: count(1), topN(100). TOP-N is grouped by APPID and order by/sum
>>>> by IMPS measure. When i queried: select APPID, SUM(IMPS) as imps from
>>>> EXT_MID_EVENT_JOIN where "DATE">='2016-01-01' and "DATE"<'2016-01-08'
group
>>>> by APPID order by imps desc limit 100, it returned 0 records. Abviously
>>>> there are a lot of records. Can someone explain why it always returned 0
>>>> records?
>>>>
>>>
>>
>>
>> --
>> Best regards,
>>
>> Shaofeng Shi
>>
>>

Mime
View raw message