danny0405 commented on a change in pull request #2228:
URL: https://github.com/apache/calcite/pull/2228#discussion_r508973073
##########
File path: core/src/main/java/org/apache/calcite/sql2rel/RelDecorrelator.java
##########
@@ -280,16 +285,19 @@ protected RelNode decorrelate(RelNode root) {
final Frame frame = getInvoke(root, null);
if (frame != null) {
// has been rewritten; apply rules post-decorrelation
- final HepProgram program2 = HepProgram.builder()
+ final HepProgramBuilder builder = HepProgram.builder()
.addRuleInstance(
CoreRules.FILTER_INTO_JOIN.config
.withRelBuilderFactory(f)
.toRule())
.addRuleInstance(
CoreRules.JOIN_CONDITION_PUSH.config
.withRelBuilderFactory(f)
- .toRule())
- .build();
+ .toRule());
+ if (getPostDecorrelateRules().size() > 0) {
Review comment:
Which kind of list has a more efficient impl ?
----------------------------------------------------------------
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]