mihaibudiu commented on code in PR #5280:
URL: https://github.com/apache/calcite/pull/5280#discussion_r4150978655
##########
core/src/main/java/org/apache/calcite/sql/validate/SqlValidatorUtil.java:
##########
@@ -1560,7 +1560,12 @@ private static void adjustTypeForMultisetConstructor(
if (adjustedOperands == null) {
adjustedOperands = new ArrayList<>(operands);
}
- adjustedOperands.set(i, castTo(operands.get(i), elementType));
+ SqlCall cast = (SqlCall) castTo(operands.get(i), elementType);
+ // This CAST was generated with the built-in operator; validate its
+ // operands directly instead of resolving the function again by name.
+ cast.getOperator().validateOperands(
Review Comment:
You seem to do strictly more work than before.
This looks correct, but does not seem more efficient.
--
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]