chunweilei commented on a change in pull request #1215: [CALCITE-3068]
testSubprogram() does not test whether subprogram gets re-executed
URL: https://github.com/apache/calcite/pull/1215#discussion_r285345035
##########
File path: core/src/test/java/org/apache/calcite/test/HepPlannerTest.java
##########
@@ -251,14 +251,15 @@ private void assertIncludesExactlyOnce(String message,
String digest, String sub
subprogramBuilder.addMatchOrder(HepMatchOrder.TOP_DOWN);
subprogramBuilder.addMatchLimit(1);
subprogramBuilder.addRuleInstance(ProjectToCalcRule.INSTANCE);
+ subprogramBuilder.addRuleInstance(FilterToCalcRule.INSTANCE);
subprogramBuilder.addRuleInstance(CalcMergeRule.INSTANCE);
HepProgramBuilder programBuilder = HepProgram.builder();
programBuilder.addSubprogram(subprogramBuilder.build());
checkPlanning(
programBuilder.build(),
- "select upper(ename) from (select lower(ename) as ename from emp)");
+ "select upper(ename) from (select lower(ename) as ename from emp where
empno = 100)");
Review comment:
You're right. So I changed this test and it will break if the subProgram
does not really fire 2 times. The original plan of the test shows the
difference.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services