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

kangkaisen commented on KYLIN-2744:
-----------------------------------

I don't think so.

1. The date type for the sum measure of double type should be double type .  
The Presto and Hive handle Sum by this way. We should be  consistent with 
Presto and Hive.

2 The front-end should be consistent with back-end.

{code:java}
        if (isSum() || isCount()) {
            if (dataType.isDecimal())
                return new BigDecimalSumAggregator();
            else if (dataType.isIntegerFamily())
                return new LongSumAggregator();
            else if (dataType.isNumberFamily())
                return new DoubleSumAggregator();
{code}


> Should return correct type for SUM measure in web
> -------------------------------------------------
>
>                 Key: KYLIN-2744
>                 URL: https://issues.apache.org/jira/browse/KYLIN-2744
>             Project: Kylin
>          Issue Type: Bug
>          Components: Web 
>    Affects Versions: v2.0.0
>            Reporter: kangkaisen
>            Assignee: kangkaisen
>         Attachments: KYLIN-2744.patch
>
>
> Currently, Kylin return decimal type for the  sum measure of double type, 
> which will result in wrong result. So, We should return correct type for SUM 
> measure in web.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to