use of io.prestosql.plugin.jdbc.JdbcClient in project hetu-core by openlookeng.
the class TestJdbcPlanOptimizer method getOptimizedPlan.
private PlanNode getOptimizedPlan(PlanBuilder planBuilder, PlanNode originalPlan) {
BaseJdbcConfig config = new BaseJdbcConfig();
JdbcClient client = new TestPushwonClient();
TesterParameter testerParameter = TesterParameter.getTesterParameter();
JdbcPlanOptimizer optimizer = new JdbcPlanOptimizer(client, new TestTypeManager(), config, testerParameter.getRowExpressionService(), testerParameter.getDeterminismEvaluator(), testerParameter.getMetadata().getFunctionAndTypeManager(), testerParameter.getFunctionResolution());
return optimizer.optimize(originalPlan, defaultSessionHolder.getConnectorSession(), ImmutableMap.<String, Type>builder().put("regionid", INTEGER).put("city", VARCHAR).put("fare", DOUBLE).put("amount", BIGINT).build(), new PlanSymbolAllocator(), planBuilder.getIdAllocator());
}
Aggregations