Search in sources :

Example 6 with ByteCountVisitor

use of org.apache.phoenix.execute.visitor.ByteCountVisitor in project phoenix by apache.

the class SortMergeJoinPlan method getCost.

@Override
public Cost getCost() {
    Double byteCount = this.accept(new ByteCountVisitor());
    if (byteCount == null) {
        return Cost.UNKNOWN;
    }
    Cost cost = new Cost(0, 0, byteCount);
    return cost.plus(lhsPlan.getCost()).plus(rhsPlan.getCost());
}
Also used : ByteCountVisitor(org.apache.phoenix.execute.visitor.ByteCountVisitor) Cost(org.apache.phoenix.optimize.Cost)

Aggregations

ByteCountVisitor (org.apache.phoenix.execute.visitor.ByteCountVisitor)6 Cost (org.apache.phoenix.optimize.Cost)6 SQLException (java.sql.SQLException)2 AvgRowWidthVisitor (org.apache.phoenix.execute.visitor.AvgRowWidthVisitor)2 RowCountVisitor (org.apache.phoenix.execute.visitor.RowCountVisitor)2