ihuzenko commented on a change in pull request #1610: [CALCITE-3525]
RexSimplify: eliminate redundant rex calls in OR
URL: https://github.com/apache/calcite/pull/1610#discussion_r352495104
##########
File path: core/src/main/java/org/apache/calcite/rex/RexSimplify.java
##########
@@ -2210,7 +2210,8 @@ private Comparison(RexNode ref, SqlKind kind, RexLiteral
literal) {
/** Creates a comparison, between a {@link RexInputRef} or {@link
RexFieldAccess}
* and a literal. */
static Comparison of(RexNode e) {
- return of(e, node -> RexUtil.isReferenceOrAccess(node, true));
+ return of(e, node -> RexUtil.isReferenceOrAccess(node, true)
+ || RexUtil.isDeterministic(node));
Review comment:
Is constant didn't satisfy my test, so I've updated javadoc.
----------------------------------------------------------------
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