Search in sources :

Example 1 with DynamicFiltersChecker

use of io.trino.sql.planner.sanity.DynamicFiltersChecker in project trino by trinodb.

the class TestRemoveUnsupportedDynamicFilters method removeUnsupportedDynamicFilters.

private PlanNode removeUnsupportedDynamicFilters(PlanNode root) {
    return getQueryRunner().inTransaction(session -> {
        // metadata.getCatalogHandle() registers the catalog for the transaction
        session.getCatalog().ifPresent(catalog -> metadata.getCatalogHandle(session, catalog));
        PlanNode rewrittenPlan = new RemoveUnsupportedDynamicFilters(plannerContext).optimize(root, session, builder.getTypes(), new SymbolAllocator(), new PlanNodeIdAllocator(), WarningCollector.NOOP);
        new DynamicFiltersChecker().validate(rewrittenPlan, session, plannerContext, createTestingTypeAnalyzer(plannerContext), builder.getTypes(), WarningCollector.NOOP);
        return rewrittenPlan;
    });
}
Also used : SymbolAllocator(io.trino.sql.planner.SymbolAllocator) PlanNode(io.trino.sql.planner.plan.PlanNode) PlanNodeIdAllocator(io.trino.sql.planner.PlanNodeIdAllocator) DynamicFiltersChecker(io.trino.sql.planner.sanity.DynamicFiltersChecker) RemoveUnsupportedDynamicFilters(io.trino.sql.planner.iterative.rule.RemoveUnsupportedDynamicFilters)

Aggregations

PlanNodeIdAllocator (io.trino.sql.planner.PlanNodeIdAllocator)1 SymbolAllocator (io.trino.sql.planner.SymbolAllocator)1 RemoveUnsupportedDynamicFilters (io.trino.sql.planner.iterative.rule.RemoveUnsupportedDynamicFilters)1 PlanNode (io.trino.sql.planner.plan.PlanNode)1 DynamicFiltersChecker (io.trino.sql.planner.sanity.DynamicFiltersChecker)1