use of com.facebook.presto.sql.planner.iterative.rule.RemoveUnsupportedDynamicFilters in project presto by prestodb.
the class TestRemoveUnsupportedDynamicFilters method removeUnsupportedDynamicFilters.
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(metadata.getFunctionAndTypeManager()).optimize(root, session, TypeProvider.empty(), new PlanVariableAllocator(), new PlanNodeIdAllocator(), WarningCollector.NOOP);
new DynamicFiltersChecker().validate(rewrittenPlan, session, metadata, new SqlParser(), TypeProvider.empty(), WarningCollector.NOOP);
return rewrittenPlan;
});
}
Aggregations