Package io.trino.cost
Class CostCalculatorUsingExchanges
- java.lang.Object
-
- io.trino.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.trino.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 PlanCostEstimatecalculateCost(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:CostCalculatorCalculates cumulative cost of a node.- Specified by:
calculateCostin 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
-
-