NobiGo commented on code in PR #3899:
URL: https://github.com/apache/calcite/pull/3899#discussion_r1702917956


##########
core/src/main/java/org/apache/calcite/sql/type/SqlTypeUtil.java:
##########
@@ -330,6 +330,10 @@ public static boolean containsNullable(RelDataType type) {
   public static RelDataType keepSourceTypeAndTargetNullability(RelDataType 
sourceRelDataType,
                                              RelDataType targetRelDataType,
                                              RelDataTypeFactory typeFactory) {
+    checkArgument(
+        (targetRelDataType.isStruct() && sourceRelDataType.isStruct())
+            || (!targetRelDataType.isStruct() && 
!sourceRelDataType.isStruct()),
+        "Input sourceRelDataType and targetRelDataType must have same struct 
type");

Review Comment:
   It has been modified as recommended.



##########
core/src/test/resources/sql/sub-query.iq:
##########
@@ -3812,4 +3812,242 @@ WHERE s1.total > (SELECT avg(total) FROM agg_sal s2 
WHERE s1.deptno = s2.deptno)
 
 !ok
 
+# [CALCITE-6506] Type inference for IN list is incorrect
+
+# Test LHS is no nullable and RHS is no nullable

Review Comment:
   It has been modified as recommended.



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