Package io.trino.cost
Class CostCalculatorUsingExchanges
java.lang.Object
io.trino.cost.CostCalculatorUsingExchanges
- All Implemented Interfaces:
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 -
Method Summary
Modifier and TypeMethodDescriptioncalculateCost(PlanNode node, StatsProvider stats, CostProvider sourcesCosts, Session session) Calculates cumulative cost of a node.
-
Constructor Details
-
CostCalculatorUsingExchanges
-
-
Method Details
-
calculateCost
public PlanCostEstimate calculateCost(PlanNode node, StatsProvider stats, CostProvider sourcesCosts, Session session) 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
-