public class RelOptCostImpl extends Object implements RelOptCost
RelOptCost
interface. It it defined in terms of a single scalar quantity; somewhat
arbitrarily, it returns this scalar for rows processed and zero for both CPU
and I/O.| Modifier and Type | Field and Description |
|---|---|
static RelOptCostFactory |
FACTORY |
| Constructor and Description |
|---|
RelOptCostImpl(double value) |
| Modifier and Type | Method and Description |
|---|---|
double |
divideBy(RelOptCost cost)
Computes the ratio between this cost and another cost.
|
boolean |
equals(RelOptCost other)
Compares this to another cost.
|
double |
getCpu() |
double |
getIo() |
double |
getRows() |
int |
hashCode() |
boolean |
isEqWithEpsilon(RelOptCost other)
Compares this to another cost, allowing for slight roundoff errors.
|
boolean |
isInfinite() |
boolean |
isLe(RelOptCost other)
Compares this to another cost.
|
boolean |
isLt(RelOptCost other)
Compares this to another cost.
|
RelOptCost |
minus(RelOptCost other)
Subtracts another cost from this.
|
RelOptCost |
multiplyBy(double factor)
Multiplies this cost by a scalar factor.
|
RelOptCost |
plus(RelOptCost other)
Adds another cost to this.
|
String |
toString()
Forces implementations to override
Object.toString() and provide a
good cost rendering to use during tracing. |
public static final RelOptCostFactory FACTORY
public double getRows()
getRows in interface RelOptCostRelNode.getRows())public double getIo()
getIo in interface RelOptCostpublic double getCpu()
getCpu in interface RelOptCostpublic boolean isInfinite()
isInfinite in interface RelOptCostpublic boolean isLe(RelOptCost other)
RelOptCostisLe in interface RelOptCostother - another costpublic boolean isLt(RelOptCost other)
RelOptCostisLt in interface RelOptCostother - another costpublic boolean equals(RelOptCost other)
RelOptCostequals in interface RelOptCostother - another costpublic boolean isEqWithEpsilon(RelOptCost other)
RelOptCostisEqWithEpsilon in interface RelOptCostother - another costpublic RelOptCost minus(RelOptCost other)
RelOptCostminus in interface RelOptCostother - another costpublic RelOptCost plus(RelOptCost other)
RelOptCostplus in interface RelOptCostother - another costpublic RelOptCost multiplyBy(double factor)
RelOptCostmultiplyBy in interface RelOptCostfactor - scalar factorpublic double divideBy(RelOptCost cost)
RelOptCostdivideBy is the inverse of RelOptCost.multiplyBy(double). For any
finite, non-zero cost and factor f,
cost.divideBy(cost.multiplyBy(f)) yields 1 / f.
divideBy in interface RelOptCostcost - Other costpublic String toString()
RelOptCostObject.toString() and provide a
good cost rendering to use during tracing.toString in interface RelOptCosttoString in class ObjectCopyright © 2012–2015 The Apache Software Foundation. All rights reserved.