hongbin ma created KYLIN-1689:
---------------------------------
Summary: bug when a column being dimension as well as in a sum
metric
Key: KYLIN-1689
URL: https://issues.apache.org/jira/browse/KYLIN-1689
Project: Kylin
Issue Type: Bug
Reporter: hongbin ma
Assignee: hongbin ma
Hi all,
I recently built a cube named c1, use 2 columns as dimensions ,”rule_name”,”
PARTNER_GAIN_PAY_PT_DOC_CNT”, also use ” sum(PARTNER_GAIN_PAY_PT_DOC_CNT)” as
measure. C1 was built successfully.
So, I made a query sql to test, that is “select
rule_name,PARTNER_GAIN_PAY_PT_DOC_CNT
,count(*),sum(PARTNER_GAIN_PAY_PT_DOC_CNT) from
CUB_PARTNER_GAIN_PAY_PT_PRE0_AT0_S where rule_name='1号店3C产品' group by
rule_name,PARTNER_GAIN_PAY_PT_DOC_CNT;”, but the result is not probably exactly.
RULE_NAME PARTNER... EXPR$2 EXPR$3
1号店3C产品 1860 30 1860
1号店3C产品 700 2 700
1号店3C产品 7410 38 7410
1号店3C产品 2940 60 2940
In my opinion,”count(*)” means the amount of records with the same rule_name
and PARTNER_GAIN_PAY_PT_DOC_CNT, so I think sum(PARTNER…) equals
Count(*) * PARTNER_GAIN_PAY_PT_DOC_CNT, but the truth is not , I wonder if
there is something wrong with my understanding?
Insight snapshot as below:
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)