YasuoStudyJava commented on code in PR #3247:
URL: https://github.com/apache/calcite/pull/3247#discussion_r1226182776
##########
core/src/main/java/org/apache/calcite/rex/RexSimplify.java:
##########
@@ -2660,6 +2695,24 @@ private Comparison(RexNode ref, SqlKind kind, RexLiteral
literal) {
return new Comparison(left, e.getKind(), (RexLiteral) right);
}
break;
+ //add for RexCall like "CAST(ARRAY(..., ...))..."
+ case CAST:
+ final RexCall castCall = (RexCall) right;
+ final RexNode castLeft = castCall.getOperands().get(0);
+ switch (castLeft.getKind()) {
+ case ARRAY_VALUE_CONSTRUCTOR:
+ //array-type RexCall --> create a comparison of RexCall
+ if (nodePredicate.test(left)) {
+ return new Comparison(left, e.getKind(), (RexCall) castLeft);
+ }
+ }
+ break;
+ case ARRAY_VALUE_CONSTRUCTOR:
+ //array-type RexCall --> create a comparison of RexCall
Review Comment:
@zoudan Thank you. Maybe I will take your suggestion later on.
--
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]