kylin-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "lk_hadoop"<lk_had...@163.com>
Subject Fw: Kylin Hybrids Cont distinct got wrong value
Date Mon, 11 Nov 2019 09:27:08 GMT


2019-11-11 

lk_hadoop 



发件人:"lk_hadoop"<lk_hadoop@163.com>
发送时间:2019-11-08 10:34
主题:Kylin Hybrids Cont distinct got wrong value
收件人:"user"<user@kylin.apache.org>
抄送:

hi , all :
    I have a Measure with Cont distinct algorithm , when I use a Hybrid ,The Hybrid include
two cube, each cube have one years data , I can't get the meaningful result when across two
year. 

   -- get each year Cont distinct Measure value 
SELECT ENT_NAME, ORD_YEAR ,SUM(PAID_IN_AMT) AS sum_PAID_IN_AMT, COUNT(DISTINCT TGOODS_ID)
AS count_d_TGOODS_ID
FROM gjst.SH_FETCH_SALE_BASE_FACT_ALL_NEW2
WHERE ENT_NAME IN ('仁泰')
AND ORD_YEAR IN ('2018','2019')
GROUP BY ENT_NAME, ORD_YEAR
    
     ENT_NAME  |  ORD_YEAR  |   SUM_PAID_IN_AMT   |COUNT_D_TGOODS_ID
        仁泰                   2019                   186483922.94                7087
        仁泰                   2018                   236461205.81                9418

    -- get two year aggregation value
        SELECT ENT_NAME ,SUM(PAID_IN_AMT) AS sum_PAID_IN_AMT, COUNT(DISTINCT TGOODS_ID) AS
count_d_TGOODS_ID
        FROM gjst.SH_FETCH_SALE_BASE_FACT_ALL_NEW2
        WHERE ENT_NAME IN ('仁泰')
        AND ORD_YEAR IN ('2018','2019')
        GROUP BY ENT_NAME

    ENT_NAME  |    SUM_PAID_IN_AMT   |COUNT_D_TGOODS_ID
        仁泰                   422945128.75                      9418 

Is there any way to resolve it ? 

2019-11-08


lk_hadoop 
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message