phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From JamesRTaylor <...@git.apache.org>
Subject [GitHub] phoenix pull request #281: PHOENIX-4288 Indexes not used when ordering by pr...
Date Wed, 15 Nov 2017 01:55:10 GMT
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.


---

Mime
View raw message