use of org.weakref.jmx.testing.TestingMBeanServer in project presto by prestodb.
the class LocalQueryRunner method createPlan.
public Plan createPlan(Session session, @Language("SQL") String sql, LogicalPlanner.Stage stage) {
Statement statement = unwrapExecuteStatement(sqlParser.createStatement(sql), sqlParser, session);
assertFormattedSql(sqlParser, statement);
FeaturesConfig featuresConfig = new FeaturesConfig().setDistributedIndexJoinsEnabled(false).setOptimizeHashGeneration(true);
PlanOptimizers planOptimizers = new PlanOptimizers(metadata, sqlParser, featuresConfig, true, new MBeanExporter(new TestingMBeanServer()));
return createPlan(session, sql, planOptimizers.get(), stage);
}
use of org.weakref.jmx.testing.TestingMBeanServer in project presto by prestodb.
the class AbstractTestQueryFramework method getQueryExplainer.
private QueryExplainer getQueryExplainer() {
Metadata metadata = queryRunner.getMetadata();
FeaturesConfig featuresConfig = new FeaturesConfig().setOptimizeHashGeneration(true);
boolean forceSingleNode = queryRunner.getNodeCount() == 1;
List<PlanOptimizer> optimizers = new PlanOptimizers(metadata, sqlParser, featuresConfig, forceSingleNode, new MBeanExporter(new TestingMBeanServer())).get();
return new QueryExplainer(optimizers, metadata, queryRunner.getAccessControl(), sqlParser, ImmutableMap.of());
}
Aggregations