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_r358178174
##########
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:
Thank you, but splitting in such a case is an extra effort for nothing
because refactoring changes are very small and visible.
----------------------------------------------------------------
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