Search in sources :

Example 1 with PinotPlanOptimizer

use of com.facebook.presto.pinot.PinotPlanOptimizer in project presto by prestodb.

the class TestPinotPlanOptimizer method getOptimizedPlan.

protected PlanNode getOptimizedPlan(PinotConfig pinotConfig, PlanBuilder planBuilder, PlanNode originalPlan) {
    PinotQueryGenerator pinotQueryGenerator = new PinotQueryGenerator(pinotConfig, functionAndTypeManager, functionAndTypeManager, standardFunctionResolution);
    PinotPlanOptimizer optimizer = new PinotPlanOptimizer(pinotQueryGenerator, functionAndTypeManager, functionAndTypeManager, logicalRowExpressions, standardFunctionResolution);
    return optimizer.optimize(originalPlan, new SessionHolder(pinotConfig).getConnectorSession(), new PlanVariableAllocator(), planBuilder.getIdAllocator());
}
Also used : PlanVariableAllocator(com.facebook.presto.sql.planner.PlanVariableAllocator) PinotPlanOptimizer(com.facebook.presto.pinot.PinotPlanOptimizer)

Aggregations

PinotPlanOptimizer (com.facebook.presto.pinot.PinotPlanOptimizer)1 PlanVariableAllocator (com.facebook.presto.sql.planner.PlanVariableAllocator)1