vlsi commented on a change in pull request #1818: [CALCITE-3809] RexSimplify
simplifies nondeterministic function incorrectly
URL: https://github.com/apache/calcite/pull/1818#discussion_r382801372
##########
File path: core/src/main/java/org/apache/calcite/rex/RexAnalyzer.java
##########
@@ -128,6 +128,10 @@ public RexAnalyzer(RexNode e, RelOptPredicateList
predicates) {
}
@Override public Void visitCall(RexCall call) {
+ if (!call.getOperator().isDeterministic()) {
+ ++unsupportedCount;
Review comment:
If it can't handle lots of things that is fine. It is not fine to exclude
`isDeterministic` here because one day `rand()` function might get supported in
`RexAnalyzer`, and it would be hard to tell why it is not used.
How about adding a method like `RexInterpreter#isSupported(RexCall)`?
----------------------------------------------------------------
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