siddharthteotia commented on a change in pull request #1030: [CALCITE-2822]
Allow MultiJoin rules with any project/filter
URL: https://github.com/apache/calcite/pull/1030#discussion_r264793810
##########
File path: core/src/test/java/org/apache/calcite/test/RelOptRulesTest.java
##########
@@ -4292,6 +4293,21 @@ private Sql checkSubQuery(String sql) {
checkPlanning(program, sql);
}
+ @Test public void testFilterAndProjectWithMultiJoin() throws Exception {
+ final FilterMultiJoinMergeRule filterMultiJoinMergeRule =
+ new FilterMultiJoinMergeRule(LogicalFilter.class,
RelFactories.LOGICAL_BUILDER);
+ final ProjectMultiJoinMergeRule projectMultiJoinMergeRule =
+ new ProjectMultiJoinMergeRule(LogicalProject.class,
RelFactories.LOGICAL_BUILDER);
Review comment:
I added a new constructor in FilterMultiJoinMergeRule and
ProjectMultiJoinMergeRule that take a generic Filter.class and Project.class as
arguments respectively. The unit test just uses the new constructors with
LogicalFilter and LogicalProject
----------------------------------------------------------------
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