xuzifu666 commented on code in PR #4400:
URL: https://github.com/apache/calcite/pull/4400#discussion_r2134354571
##########
core/src/test/java/org/apache/calcite/test/RexImplicationCheckerTest.java:
##########
@@ -360,6 +361,116 @@ public class RexImplicationCheckerTest {
hasToString("2014"));
}
+ /** Test case for
Review Comment:
1. Refer to Julian's suggestion, remove the test from RelToSqlConverterTest,
and then refer to other Simplify tests such as testSimplifyCeilFloor, which add
the test to RexImplicationCheckerTest, which seems to be no problem;
2. As for why RexInterpreter##tirm is added, it is because
rexBuilder.makeCall is needed to build TRIM, otherwise calling
f.rexBuilder.makeCall(SqlStdOperatorTable.TRIM, f.rexBuilder.makeLiteral(trim),
trimed, trimString); will report an error:
```
unbound: TRIM('BOTH', 'a', 'bb')
java.lang.IllegalArgumentException: unbound: TRIM('BOTH', 'a', 'bb')
at org.apache.calcite.rex.RexInterpreter.unbound(RexInterpreter.java:99)
at
org.apache.calcite.rex.RexInterpreter.visitCall(RexInterpreter.java:244)
at
org.apache.calcite.rex.RexInterpreter.visitCall(RexInterpreter.java:58)
at org.apache.calcite.rex.RexCall.accept(RexCall.java:208)
at org.apache.calcite.rex.RexVisitor.visitList(RexVisitor.java:67)
```
@mihaibudiu
--
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]