kylin-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "wangxianbin (JIRA)" <j...@apache.org>
Subject [jira] [Created] (KYLIN-3661) query return inconsistent result
Date Thu, 01 Nov 2018 06:12:00 GMT
wangxianbin created KYLIN-3661:
----------------------------------

             Summary: query return inconsistent result
                 Key: KYLIN-3661
                 URL: https://issues.apache.org/jira/browse/KYLIN-3661
             Project: Kylin
          Issue Type: Bug
    Affects Versions: v2.4.0
            Reporter: wangxianbin
         Attachments: one.png, three.png, two.png

{{three queries on same cube. obviously,the differ between query one and two is "group by
os", however the second query have smaller "uv" and "pv", which is wrong, and query three
return correct result.}}
h1. query one

SELECT
 a.os,
 count(DISTINCT a.DUID) AS "uv",
 CASE WHEN sum(a.pv) IS NULL THEN 0 ELSE sum(a.pv) END AS "pv"
FROM dw_netflow.visit_all a
JOIN DW_NETFLOW.DW_DIM_DATE b ON a.dt = b.day_name
WHERE a.dt = '2018-10-13'
 AND a.LABEL_TYPE = 'EVENT'
group by a.os
h1. result
|OS|uv|pv|
|other|4657|869656|
|android|1713172|198955150|
|ios|118205|8438544|

 
h1. query two

SELECT
 count(DISTINCT a.DUID) AS "uv",
 CASE WHEN sum(a.pv) IS NULL THEN 0 ELSE sum(a.pv) END AS "pv"
FROM dw_netflow.visit_all a
JOIN DW_NETFLOW.DW_DIM_DATE b ON a.dt = b.day_name
WHERE a.dt = '2018-10-13'
 AND a.LABEL_TYPE = 'EVENT'
h1. result
|uv|pv|
|699022|30428195|

 
h1. query three

SELECT
 count(DISTINCT a.DUID) AS "uv",
 CASE WHEN sum(a.pv) IS NULL THEN 0 ELSE sum(a.pv) END AS "pv"
FROM dw_netflow.visit_all a
JOIN DW_NETFLOW.DW_DIM_DATE b ON a.dt = b.day_name
WHERE a.dt = '2018-10-13'
 AND a.LABEL_TYPE = 'EVENT'
 AND a.os in ('ios','android','other')
h1. result
|uv|pv|
|1830387|208263350|



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message