Package io.prestosql.cost
Class CostCalculatorUsingExchanges
- java.lang.Object
-
- io.prestosql.cost.CostCalculatorUsingExchanges
-
- All Implemented Interfaces:
CostCalculator
@ThreadSafe public class CostCalculatorUsingExchanges extends Object implements CostCalculator
Simple implementation of CostCalculator. It assumes that ExchangeNodes are already in the plan.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.prestosql.cost.CostCalculator
CostCalculator.EstimatedExchanges
-
-
Constructor Summary
Constructors Constructor Description CostCalculatorUsingExchanges(TaskCountEstimator taskCountEstimator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PlanCostEstimate
calculateCost(PlanNode node, StatsProvider stats, CostProvider sourcesCosts, Session session, TypeProvider types)
Calculates cumulative cost of a node.
-
-
-
Constructor Detail
-
CostCalculatorUsingExchanges
@Inject public CostCalculatorUsingExchanges(TaskCountEstimator taskCountEstimator)
-
-
Method Detail
-
calculateCost
public PlanCostEstimate calculateCost(PlanNode node, StatsProvider stats, CostProvider sourcesCosts, Session session, TypeProvider types)
Description copied from interface:CostCalculator
Calculates cumulative cost of a node.- Specified by:
calculateCost
in interfaceCostCalculator
- Parameters:
node
- The node to compute cost for.stats
- The stats provider for node's stats and child nodes' stats, to be used if stats are needed to compute cost for thenode
-
-