You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kylin.apache.org by "Shaofeng SHI (JIRA)" <ji...@apache.org> on 2019/03/01 14:35:00 UTC

[jira] [Commented] (KYLIN-3830) return wrong result when 'SELECT SUM(dim1)' without set a relative metric of dim1.

    [ https://issues.apache.org/jira/browse/KYLIN-3830?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16781721#comment-16781721 ] 

Shaofeng SHI commented on KYLIN-3830:
-------------------------------------

Thanks for the reporting; Can you try to reproduce this with the sample "kylin_sales" cube?

I know Kylin has some optimization rule  which calculate that on the fly if the measure is absent but the column is a dimension (we called it "dimension as measure"). For example, "count (distinct dimA)", "max(dimB)" etc. That is okay sometimes, but for the measures like "sum", that is wrong. So please avoid to query in that way at first; Of couse, the better way is Kylin directly reject that query. 

> return wrong result when 'SELECT SUM(dim1)' without set a relative metric of dim1.
> ----------------------------------------------------------------------------------
>
>                 Key: KYLIN-3830
>                 URL: https://issues.apache.org/jira/browse/KYLIN-3830
>             Project: Kylin
>          Issue Type: Bug
>    Affects Versions: v2.5.2
>            Reporter: Yuzhang QIU
>            Priority: Major
>
> Hi, dear team:
>   I design an cube1 based on table table1 with dim1, dim2, dim3.... and only one metric count(1), and 'SELECT SUM(dim1) FROM table1 group by dim2', Kylin process this SQL and return some result1. It seems ok. But as we know, Kylin don't store the detail data, the dimensions' members have been encoded and stored in Hbase as rowkey(cause I don't set any metric with an column). So, is the result1 right?
>   Then, I clone cube1 to cube2, and set a metric SUM(dim1). the same SQL has been passed to kylin and got result2. It's different from result1 at the aggregation field. I also pass same SQL to hive and got result3, it's same with result2.
>   Yes, I turn off the pushdown.
>   I think there are some problems.
>   I can't upload some picture of results for secret policy, sorry for that.



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