Search in sources :

Example 1 with CostCalculatorWithEstimatedExchanges

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

the class AbstractTestQueryFramework method getQueryExplainer.

private QueryExplainer getQueryExplainer() {
    Metadata metadata = queryRunner.getMetadata();
    FeaturesConfig featuresConfig = new FeaturesConfig().setOptimizeHashGeneration(true);
    boolean forceSingleNode = queryRunner.getNodeCount() == 1;
    TaskCountEstimator taskCountEstimator = new TaskCountEstimator(queryRunner::getNodeCount);
    CostCalculator costCalculator = new CostCalculatorUsingExchanges(taskCountEstimator);
    HetuMetaStoreManager hetuMetaStoreManager = new HetuMetaStoreManager();
    List<PlanOptimizer> optimizers = new PlanOptimizers(metadata, new TypeAnalyzer(sqlParser, metadata), featuresConfig, new TaskManagerConfig(), forceSingleNode, new MBeanExporter(new TestingMBeanServer()), queryRunner.getSplitManager(), queryRunner.getPlanOptimizerManager(), queryRunner.getPageSourceManager(), queryRunner.getStatsCalculator(), costCalculator, new CostCalculatorWithEstimatedExchanges(costCalculator, taskCountEstimator), new CostComparator(featuresConfig), taskCountEstimator, new CubeManager(featuresConfig, hetuMetaStoreManager)).get();
    return new QueryExplainer(optimizers, new PlanFragmenter(metadata, queryRunner.getNodePartitioningManager(), new QueryManagerConfig()), metadata, queryRunner.getAccessControl(), sqlParser, queryRunner.getStatsCalculator(), costCalculator, ImmutableMap.of(), new HeuristicIndexerManager(null, null), new CubeManager(featuresConfig, hetuMetaStoreManager));
}
Also used : TaskCountEstimator(io.prestosql.cost.TaskCountEstimator) CostComparator(io.prestosql.cost.CostComparator) PlanOptimizer(io.prestosql.sql.planner.optimizations.PlanOptimizer) TestingMBeanServer(org.weakref.jmx.testing.TestingMBeanServer) QueryExplainer(io.prestosql.sql.analyzer.QueryExplainer) FeaturesConfig(io.prestosql.sql.analyzer.FeaturesConfig) MBeanExporter(org.weakref.jmx.MBeanExporter) HeuristicIndexerManager(io.prestosql.heuristicindex.HeuristicIndexerManager) Metadata(io.prestosql.metadata.Metadata) PlanFragmenter(io.prestosql.sql.planner.PlanFragmenter) TaskManagerConfig(io.prestosql.execution.TaskManagerConfig) TypeAnalyzer(io.prestosql.sql.planner.TypeAnalyzer) CubeManager(io.prestosql.cube.CubeManager) CostCalculator(io.prestosql.cost.CostCalculator) PlanOptimizers(io.prestosql.sql.planner.PlanOptimizers) QueryManagerConfig(io.prestosql.execution.QueryManagerConfig) CostCalculatorUsingExchanges(io.prestosql.cost.CostCalculatorUsingExchanges) CostCalculatorWithEstimatedExchanges(io.prestosql.cost.CostCalculatorWithEstimatedExchanges) HetuMetaStoreManager(io.prestosql.metastore.HetuMetaStoreManager)

Aggregations

CostCalculator (io.prestosql.cost.CostCalculator)1 CostCalculatorUsingExchanges (io.prestosql.cost.CostCalculatorUsingExchanges)1 CostCalculatorWithEstimatedExchanges (io.prestosql.cost.CostCalculatorWithEstimatedExchanges)1 CostComparator (io.prestosql.cost.CostComparator)1 TaskCountEstimator (io.prestosql.cost.TaskCountEstimator)1 CubeManager (io.prestosql.cube.CubeManager)1 QueryManagerConfig (io.prestosql.execution.QueryManagerConfig)1 TaskManagerConfig (io.prestosql.execution.TaskManagerConfig)1 HeuristicIndexerManager (io.prestosql.heuristicindex.HeuristicIndexerManager)1 Metadata (io.prestosql.metadata.Metadata)1 HetuMetaStoreManager (io.prestosql.metastore.HetuMetaStoreManager)1 FeaturesConfig (io.prestosql.sql.analyzer.FeaturesConfig)1 QueryExplainer (io.prestosql.sql.analyzer.QueryExplainer)1 PlanFragmenter (io.prestosql.sql.planner.PlanFragmenter)1 PlanOptimizers (io.prestosql.sql.planner.PlanOptimizers)1 TypeAnalyzer (io.prestosql.sql.planner.TypeAnalyzer)1 PlanOptimizer (io.prestosql.sql.planner.optimizations.PlanOptimizer)1 MBeanExporter (org.weakref.jmx.MBeanExporter)1 TestingMBeanServer (org.weakref.jmx.testing.TestingMBeanServer)1