danny0405 commented on a change in pull request #1547: [CALCITE-3460] Poor
performance in RexReplacer for large queries
URL: https://github.com/apache/calcite/pull/1547#discussion_r340467955
##########
File path:
core/src/main/java/org/apache/calcite/rel/rules/ReduceExpressionsRule.java
##########
@@ -868,8 +872,8 @@ protected static RexNode substitute(RexCall call, int
ordinal, RexNode node) {
}
private RexNode visit(final RexNode call) {
- int i = reducibleExps.indexOf(call);
- if (i == -1) {
+ Integer i = reducibleExpsMap.get(call);
+ if (i == null) {
Review comment:
Why not just use a `HashSet` ?
----------------------------------------------------------------
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