mihaibudiu commented on code in PR #4066:
URL: https://github.com/apache/calcite/pull/4066#discussion_r1861555161
##########
core/src/main/java/org/apache/calcite/sql2rel/ConvertToChecked.java:
##########
@@ -50,13 +51,18 @@ public ConvertToChecked(RexBuilder builder) {
* Visitor which rewrites an expression tree such that all
* arithmetic operations that produce numeric values use checked arithmetic.
*/
- static class ConvertRexToChecked extends RexShuttle {
+ class ConvertRexToChecked extends RexShuttle {
private final RexBuilder builder;
ConvertRexToChecked(RexBuilder builder) {
this.builder = builder;
}
+ @Override public RexNode visitSubQuery(RexSubQuery subQuery) {
+ RelNode result = subQuery.rel.accept(ConvertToChecked.this);
+ return subQuery.clone(result);
Review Comment:
This is not the Java Object.clone() method, that one has no arguments.
You can see the JavaDoc for the clone methods for RexCall in RexCall.clone().
```
/**
* Creates a new call to the same operator with different operands.
*
* @param type Return type
* @param operands Operands to call
* @return New call
*/
public RexCall clone(RelDataType type, List<RexNode> operands) {
```
--
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]