Github user ejwhite922 commented on a diff in the pull request:

    https://github.com/apache/incubator-rya/pull/291#discussion_r182849095
  
    --- Diff: 
extras/indexing/src/main/java/org/apache/rya/indexing/IndexPlanValidator/ThreshholdPlanSelector.java
 ---
    @@ -111,9 +110,9 @@ public double getCost(TupleExpr te, double indexWeight, 
double commonVarWeight,
             double dirProductScale;
             
             if(queryNodeCount > nodeCount) {
    -            dirProductScale = 1/((double)(queryNodeCount - nodeCount));
    +            dirProductScale = 1/ (queryNodeCount - nodeCount);
    --- End diff --
    
    nodeCount is a double so java forces the divisor here to be a double as 
well so there's no precision lost.  Casting it to a double would only be needed 
if queryNodeCount and nodeCount were both int's (or other less precise number 
types).


---

Reply via email to