Search in sources :

Example 1 with PlanAssert.assertPlan

use of io.trino.sql.planner.assertions.PlanAssert.assertPlan in project trino by trinodb.

the class QueryAssertions method assertQueryAndPlan.

public void assertQueryAndPlan(@Language("SQL") String actual, @Language("SQL") String expected, PlanMatchPattern pattern) {
    assertQuery(runner.getDefaultSession(), actual, expected, false);
    Plan plan = runner.executeWithPlan(runner.getDefaultSession(), actual, WarningCollector.NOOP).getQueryPlan();
    PlanAssert.assertPlan(runner.getDefaultSession(), runner.getMetadata(), runner.getFunctionManager(), runner.getStatsCalculator(), plan, pattern);
}
Also used : PlanAssert.assertPlan(io.trino.sql.planner.assertions.PlanAssert.assertPlan) Plan(io.trino.sql.planner.Plan)

Aggregations

Plan (io.trino.sql.planner.Plan)1 PlanAssert.assertPlan (io.trino.sql.planner.assertions.PlanAssert.assertPlan)1