mihaibudiu commented on code in PR #4113:
URL: https://github.com/apache/calcite/pull/4113#discussion_r1898671975
##########
core/src/main/java/org/apache/calcite/rel/rules/ProjectWindowTransposeRule.java:
##########
@@ -217,6 +217,15 @@ private static ImmutableBitSet findReference(final Project
project,
}
}
+ List<RexNode> analyze = new ArrayList<>();
+ if (group.lowerBound.getOffset() != null) {
+ analyze.add(group.lowerBound.getOffset());
+ }
+ if (group.upperBound.getOffset() != null) {
+ analyze.add(group.upperBound.getOffset());
+ }
+ referenceFinder.apply(analyze);
+
Review Comment:
This seems to work in this case.
The style of visitors I am used to requires always the entry point to be a
visitor `apply` function, and not an `accept` function of the visited object.
This is because the visitor may setup and teardown some data structures on
`apply`.
A quick look through the codebase shows lots of accept calls, so I will use
your suggestion.
--
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]