zstan commented on code in PR #13311:
URL: https://github.com/apache/ignite/pull/13311#discussion_r3704177752
##########
modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/planner/AbstractPlannerTest.java:
##########
@@ -455,20 +504,34 @@ protected <T extends RelNode> void assertPlan(
Predicate<T> predicate,
String... disabledRules
) throws Exception {
- assertPlan(sql, schemas, null, predicate, disabledRules);
+ TestPlanningContextBuilder builder =
contextBuilder().query(sql).schemas(schemas).disabledRules(disabledRules);
+
+ assertPlan(builder, predicate);
}
/** */
protected <T extends RelNode> void assertPlan(
String sql,
- Collection<IgniteSchema> schemas,
- @Nullable RelOptListener planLsnr,
+ IgniteSchema schema,
+ RelOptListener planLsnr,
Predicate<T> predicate,
String... disabledRules
) throws Exception {
- IgniteRel plan = physicalPlan(plannerCtx(sql, schemas, planLsnr,
disabledRules));
+ TestPlanningContextBuilder builder =
contextBuilder().query(sql).schema(schema).disabledRules(disabledRules)
+ .planListener(planLsnr);
+
+ assertPlan(builder, predicate);
+ }
+
+ /** */
+ private <T extends RelNode> void invalidatePlan(
+ TestPlanningContextBuilder ctxBuilder,
+ Predicate<T> predicate
+ ) throws Exception {
+ IgniteRel plan = physicalPlan(plannerCtx(ctxBuilder.query,
ctxBuilder.schemas, ctxBuilder.planListener,
Review Comment:
done
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]