[jira] [Commented] (KYLIN-2744) Should return correct type for SUM measure in web

2018-01-24 Thread Billy Liu (JIRA)

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

Billy Liu commented on KYLIN-2744:
--

I think this issue is still opening. 

> 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
>Priority: Major
> 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
(v7.6.3#76005)


[jira] [Commented] (KYLIN-2744) Should return correct type for SUM measure in web

2017-10-22 Thread kangkaisen (JIRA)

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

kangkaisen commented on KYLIN-2744:
---

Hi, Zhixiong.  OK, I see.  I will update the patch later. 

> 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)


[jira] [Commented] (KYLIN-2744) Should return correct type for SUM measure in web

2017-10-20 Thread Zhixiong Chen (JIRA)

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

Zhixiong Chen commented on KYLIN-2744:
--

Hi, Kaisen. Sorry for late to reply this jira.But maybe we can provide users a 
way to change return type in sum measures.
We could limit the choice scope based on the measure's column type.
Like the column type is double ,then the return type  could be decimal, float, 
double.And the default return type is double.

> 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)


[jira] [Commented] (KYLIN-2744) Should return correct type for SUM measure in web

2017-07-22 Thread kangkaisen (JIRA)

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

kangkaisen commented on KYLIN-2744:
---

Thanks liyang and Billy for your comment.

I think the column type and sum measure type should be same in web, and 
back-end use current Ingester and Aggregator handle sum measure,  and the final 
result will consistent with Presto and Hive. which is reasonable, user-friendly 
and easy. 

As for the sum for double type is not fully precise,If user want to get fully 
precise result, user should use decimal type in Hive. 

> 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)


[jira] [Commented] (KYLIN-2744) Should return correct type for SUM measure in web

2017-07-20 Thread Billy Liu (JIRA)

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

Billy Liu commented on KYLIN-2744:
--

Could we allow user to choose which is the best return type for that measure? 
The default return type could be the same type with column, but allow user to 
change it to others. We could limit the choice scope, to reduce the mistakes. 

> 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)


[jira] [Commented] (KYLIN-2744) Should return correct type for SUM measure in web

2017-07-20 Thread liyang (JIRA)

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

liyang commented on KYLIN-2744:
---

I know the history of sum double as decimal. Sum of double incurs small errors 
like 1+2=2.9. While this error should be perfectly fine, it worries pilot 
users in early days of Kylin. To make sure the sum result is super precise, it 
is then decided to use decimal to sum floats and doubles.

I think we could return double for sum double by default, but returning decimal 
should still be available. At least for backward compatibility.

> 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)


[jira] [Commented] (KYLIN-2744) Should return correct type for SUM measure in web

2017-07-16 Thread kangkaisen (JIRA)

[ 
https://issues.apache.org/jira/browse/KYLIN-2744?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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)


[jira] [Commented] (KYLIN-2744) Should return correct type for SUM measure in web

2017-07-16 Thread Zhixiong Chen (JIRA)

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

Zhixiong Chen commented on KYLIN-2744:
--

If return double type for the sum measure of double type,it could cause 
floating point error.And you say the decimal type will result in wrong 
result.Could you show more detail about it? [~kangkaisen]en

> 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)