Search in sources :

Example 1 with StatsRulesProvider

use of io.trino.cost.StatsCalculatorModule.StatsRulesProvider in project trino by trinodb.

the class LocalQueryRunner method createNewStatsCalculator.

private static StatsCalculator createNewStatsCalculator(PlannerContext plannerContext, TypeAnalyzer typeAnalyzer) {
    StatsNormalizer normalizer = new StatsNormalizer();
    ScalarStatsCalculator scalarStatsCalculator = new ScalarStatsCalculator(plannerContext, typeAnalyzer);
    FilterStatsCalculator filterStatsCalculator = new FilterStatsCalculator(plannerContext, scalarStatsCalculator, normalizer);
    return new ComposableStatsCalculator(new StatsRulesProvider(plannerContext, scalarStatsCalculator, filterStatsCalculator, normalizer).get());
}
Also used : StatsNormalizer(io.trino.cost.StatsNormalizer) ScalarStatsCalculator(io.trino.cost.ScalarStatsCalculator) FilterStatsCalculator(io.trino.cost.FilterStatsCalculator) StatsRulesProvider(io.trino.cost.StatsCalculatorModule.StatsRulesProvider) ComposableStatsCalculator(io.trino.cost.ComposableStatsCalculator)

Aggregations

ComposableStatsCalculator (io.trino.cost.ComposableStatsCalculator)1 FilterStatsCalculator (io.trino.cost.FilterStatsCalculator)1 ScalarStatsCalculator (io.trino.cost.ScalarStatsCalculator)1 StatsRulesProvider (io.trino.cost.StatsCalculatorModule.StatsRulesProvider)1 StatsNormalizer (io.trino.cost.StatsNormalizer)1