mihaibudiu commented on code in PR #3844:
URL: https://github.com/apache/calcite/pull/3844#discussion_r1902126478


##########
core/src/main/java/org/apache/calcite/sql/type/ArrayElementOperandTypeChecker.java:
##########
@@ -95,6 +97,14 @@ public ArrayElementOperandTypeChecker(boolean 
arrayMayBeNull, boolean elementMay
 
       return false;
     }
+
+    if (!arrayComponentType.equalsSansFieldNames(biggest)) {

Review Comment:
   It is appropriate to insert casts in the TypeCoercion phase, but in type 
checking it's too late. 
   See https://issues.apache.org/jira/browse/CALCITE-6743 for the kinds of 
problems this creates: the types computed by the validator no longer reflect 
the expression tree that is being type checked.



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