[
https://issues.apache.org/jira/browse/KYLIN-2718?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16095941#comment-16095941
]
liyang commented on KYLIN-2718:
-------------------------------
I could make a simple LongOverflowDetector that checks a long keeps increasing.
The result should be much cleaner and less scattered Sample code would be:
{code:java}
long combination = 1;
LongOverflowDetector overflow = new LongOverflowDetector(combination);
// increase the combination
overflow.check(combination);
// increase the combination again
overflow.check(combination);
{code}
> overflow when calculating combination amount based on static rules
> ------------------------------------------------------------------
>
> Key: KYLIN-2718
> URL: https://issues.apache.org/jira/browse/KYLIN-2718
> Project: Kylin
> Issue Type: Bug
> Components: Metadata
> Affects Versions: all
> Reporter: Zhong Yanghong
> Assignee: Zhong Yanghong
> Fix For: v2.0.0
>
> Attachments: APACHE-KYLIN-2718.patch
>
>
> In extreme case, value of *combination* will exceed Long.MAX_VALUE leading to
> the validation noneffective.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)