Edward Zhang created KYLIN-1396: ----------------------------------- Summary: 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
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)