[
https://issues.apache.org/jira/browse/KYLIN-2893?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ted Yu updated KYLIN-2893:
--------------------------
Description:
{code}
if (hitFrequencyMap.get(cuboid) != null) {
tmpCuboidHitProbabilityMap.put(cuboid, unitUncertainProb
+ (1 - WEIGHT_FOR_UN_QUERY) *
hitFrequencyMap.get(cuboid) / totalHitFrequency);
{code}
We should check that totalHitFrequency is not zero before performing division.
was:
{code}
if (hitFrequencyMap.get(cuboid) != null) {
tmpCuboidHitProbabilityMap.put(cuboid, unitUncertainProb
+ (1 - WEIGHT_FOR_UN_QUERY) *
hitFrequencyMap.get(cuboid) / totalHitFrequency);
{code}
We should check that totalHitFrequency is not zero before performing division.
> Missing zero check for totalHitFrequency in CuboidStats ctor
> ------------------------------------------------------------
>
> Key: KYLIN-2893
> URL: https://issues.apache.org/jira/browse/KYLIN-2893
> Project: Kylin
> Issue Type: Bug
> Reporter: Ted Yu
> Priority: Minor
>
> {code}
> if (hitFrequencyMap.get(cuboid) != null) {
> tmpCuboidHitProbabilityMap.put(cuboid, unitUncertainProb
> + (1 - WEIGHT_FOR_UN_QUERY) *
> hitFrequencyMap.get(cuboid) / totalHitFrequency);
> {code}
> We should check that totalHitFrequency is not zero before performing division.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)