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

Edward Zhang commented on KYLIN-1345:
-------------------------------------

[~honma] I get your point. But I would suggest not to modify getReturnType 
directly as we don't know what semantics people want to have in different 
scenarios. Our goal is to make sure semantically data type should be rewritten 
to decimal(19,xx) when it happens only for serialization time for sum function 
against decimal type. It is not the responsibility of FunctionDesc to adjust 
the data type.
But that is good point. We should be able to add another static help method in 
FunctionDesc to rewrite/adjust data type for the case of serialization. But we 
have to deal with the serialization case one by one.
Let me know your responsibility.

> measure type expansion when dealing sum of decimal metric
> ---------------------------------------------------------
>
>                 Key: KYLIN-1345
>                 URL: https://issues.apache.org/jira/browse/KYLIN-1345
>             Project: Kylin
>          Issue Type: Improvement
>            Reporter: hongbin ma
>            Assignee: Edward Zhang
>              Labels: newbie
>
> suppose a metric column price is of type decimal (6,2), the sum aggregator of 
> it might exceed the maximal of decimal (6,2). Currently for metric 
> aggregators we inherite the column's type in hive. We should think auto 
> expanding decimal type to decimal(18,4) (just an example) for such cases



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to