kgyrtkirk commented on a change in pull request #1941:
URL: https://github.com/apache/calcite/pull/1941#discussion_r420604462
##########
File path: core/src/test/java/org/apache/calcite/test/RelOptRulesTest.java
##########
@@ -1010,6 +1011,39 @@ private void
basePushFilterPastAggWithGroupingSets(boolean unchanged)
sql(sql).with(program).check();
}
+ @Test void testSortRemoveRowCountBased() {
+ final HepProgram program = new HepProgramBuilder()
+ .addRuleInstance(SortRemoveRule.INSTANCE)
+ .build();
+ final String sql = "select count(*) as c\n"
+ + "from sales.emp\n"
+ + "where deptno = 10\n"
+ + "limit 10";
+ sql(sql).with(program).check();
+ }
+
+ @Test void testSortRemoveRowCountBasedZeroLimit() {
+ final HepProgram program = new HepProgramBuilder()
+ .addRuleInstance(SortRemoveRule.INSTANCE)
Review comment:
only 2 of them...I think we might not be able to check core features of
some rules because the RelBuiilder may fix it beforehand.
at some point we should either have to introduce a switch to disable
`RelBuilder` being smart...or make the current one a derivative of a basic one.
but anyway...this is outside of the scope of this change - I'll file a
ticket for it
----------------------------------------------------------------
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]