[jira] [Commented] (KYLIN-2893) Missing zero check for totalHitFrequency in CuboidStats ctor

2018-01-28 Thread Zhong Yanghong (JIRA)

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

Zhong Yanghong commented on KYLIN-2893:
---

Hi [~liukaige], based on the logic to calculate {{totalHitFrequency}}, it will 
not be zero.

> 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
>Assignee:  Kaige Liu
>Priority: Minor
> Attachments: KYLIN-2893.master.001.patch
>
>
> {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
(v7.6.3#76005)


[jira] [Commented] (KYLIN-2893) Missing zero check for totalHitFrequency in CuboidStats ctor

2018-01-26 Thread Dong Li (JIRA)

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

Dong Li commented on KYLIN-2893:


Hi [~yaho], could you help review this patch? thanks!

> 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
>Assignee:  Kaige Liu
>Priority: Minor
> Attachments: KYLIN-2893.master.001.patch
>
>
> {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
(v7.6.3#76005)


[jira] [Commented] (KYLIN-2893) Missing zero check for totalHitFrequency in CuboidStats ctor

2018-01-25 Thread Kaige Liu (JIRA)

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

 Kaige Liu commented on KYLIN-2893:
---

Hi [~lidong_sjtu], would you please help review my patch. Thanks. 

> 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
>Assignee:  Kaige Liu
>Priority: Minor
> Attachments: KYLIN-2893.master.001.patch
>
>
> {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
(v7.6.3#76005)