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

    https://github.com/apache/phoenix/pull/281#discussion_r151014126
  
    --- Diff: 
phoenix-core/src/main/java/org/apache/phoenix/execute/HashJoinPlan.java ---
    @@ -290,6 +291,25 @@ public FilterableStatement getStatement() {
             return statement;
         }
     
    +    @Override
    +    public Cost getCost() throws SQLException {
    +        Long byteCount = getEstimatedBytesToScan();
    +        if (byteCount == null) {
    +            return Cost.ZERO;
    +        }
    +
    +        Cost cost = new Cost(0, 0, byteCount);
    +        Cost lhsCost = delegate.getCost();
    +        if (keyRangeExpressions != null) {
    +            lhsCost = lhsCost.multiplyBy(0.01);
    --- End diff --
    
    Why the 0.01? More comments would be good.


---

Reply via email to