You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kylin.apache.org by "hongbin ma (JIRA)" <ji...@apache.org> on 2016/02/03 07:42:40 UTC

[jira] [Resolved] (KYLIN-1396) minor bug in BigDecimalSerializer - avoidVerbose should be incremented each time when input scale is larger than given scale

     [ https://issues.apache.org/jira/browse/KYLIN-1396?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

hongbin ma resolved KYLIN-1396.
-------------------------------
       Resolution: Fixed
    Fix Version/s: 2.1
                   1.3

> minor bug in BigDecimalSerializer - avoidVerbose should be incremented each time when input scale is larger than given scale 
> -----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: KYLIN-1396
>                 URL: https://issues.apache.org/jira/browse/KYLIN-1396
>             Project: Kylin
>          Issue Type: Bug
>    Affects Versions: 2.0
>            Reporter: Edward Zhang
>            Assignee: Edward Zhang
>            Priority: Minor
>             Fix For: 2.0, 1.3, 2.1
>
>
> avoidVerbose is used for suppressing the warning message, but it should be incremented each time when input scale is larger than given scale 
> public void serialize(BigDecimal value, ByteBuffer out) {
>         if (value.scale() > type.getScale()) {
>             if (avoidVerbose++ % 10000 == 0) {
>                 logger.warn("value's scale has exceeded the " + type.getScale() + ", cut it off, to ensure encoded value do not exceed maxLength " + maxLength + " times:" + (avoidVerbose));
>             }
>             value = value.setScale(type.getScale(), BigDecimal.ROUND_HALF_EVEN);
>         }



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