mihaibudiu commented on code in PR #4355:
URL: https://github.com/apache/calcite/pull/4355#discussion_r2076014425
##########
core/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java:
##########
@@ -1528,7 +1528,9 @@ private void handleOffsetFetch(@Nullable SqlNode offset,
@Nullable SqlNode fetch
((SqlBasicCall) call).setOperator(overloads.get(0));
}
}
- if (config.callRewrite()) {
+ if (config.callRewrite()
+ // Do not rewrite calls that contain subqueries
+ && !SqlUtil.containsCall(call, c -> c.getKind() == SqlKind.SELECT)) {
Review Comment:
The only problem with this PR is that the user asks for a function
expansion, and this expansion is not done for some functions which have
subqueries as arguments. This means that users may see these functions in the
produced code although they expect them to be gone. I think there should be an
alternative way to perform these expansions after decorrelation.
--
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]