Search in sources :

Example 6 with CostProvider

use of io.prestosql.cost.CostProvider in project hetu-core by openlookeng.

the class RuleAssert method formatPlan.

private String formatPlan(PlanNode plan, TypeProvider types) {
    StatsProvider statsProvider = new CachingStatsProvider(statsCalculator, session, types);
    CostProvider costProvider = new CachingCostProvider(costCalculator, statsProvider, session, types);
    return inTransaction(session -> textLogicalPlan(translateExpressions(plan, types), types, metadata, StatsAndCosts.create(plan, statsProvider, costProvider), session, 2, false));
}
Also used : CachingStatsProvider(io.prestosql.cost.CachingStatsProvider) CachingStatsProvider(io.prestosql.cost.CachingStatsProvider) StatsProvider(io.prestosql.cost.StatsProvider) CachingCostProvider(io.prestosql.cost.CachingCostProvider) CostProvider(io.prestosql.cost.CostProvider) CachingCostProvider(io.prestosql.cost.CachingCostProvider)

Aggregations

CachingCostProvider (io.prestosql.cost.CachingCostProvider)6 CachingStatsProvider (io.prestosql.cost.CachingStatsProvider)6 CostProvider (io.prestosql.cost.CostProvider)6 StatsProvider (io.prestosql.cost.StatsProvider)6 PlanNode (io.prestosql.spi.plan.PlanNode)3 SystemSessionProperties.isSkipAttachingStatsWithPlan (io.prestosql.SystemSessionProperties.isSkipAttachingStatsWithPlan)2 PlanOptimizer (io.prestosql.sql.planner.optimizations.PlanOptimizer)2 Plan (io.prestosql.sql.planner.Plan)1 RowExpressionPredicateExtractor (io.prestosql.sql.planner.RowExpressionPredicateExtractor)1 TypeProvider (io.prestosql.sql.planner.TypeProvider)1 Lookup (io.prestosql.sql.planner.iterative.Lookup)1 Memo (io.prestosql.sql.planner.iterative.Memo)1 BeginTableWrite (io.prestosql.sql.planner.optimizations.BeginTableWrite)1 SimplePlanRewriter (io.prestosql.sql.planner.plan.SimplePlanRewriter)1 RowExpressionDomainTranslator (io.prestosql.sql.relational.RowExpressionDomainTranslator)1