FrankChen021 commented on code in PR #5280:
URL: https://github.com/apache/calcite/pull/5280#discussion_r4237616468


##########
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:
   That's fare. the intention here is to keep the type in the cache for cast 
expression. let me take a look at if there's a better way to make it



-- 
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]

Reply via email to