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


##########
core/src/test/java/org/apache/calcite/test/SqlValidatorTest.java:
##########
@@ -1057,6 +1057,19 @@ void testDyadicCollateOperator() {
             + "Was expecting 3 arguments");
   }
 
+  /** Test case for <a 
href="https://issues.apache.org/jira/projects/CALCITE/issues/CALCITE-6813";>
+   * [CALCITE-6813] UNNEST infers incorrect nullability for the result when 
applied to
+   * an array that contains nullable ROW values</a>. */
+  @Test void testUnnestRow() {
+    sql("with orders(data) as\n"
+        + "  (values (ARRAY[ROW(1, 'Alice'), ROW(2, NULL), ROW(NULL, 'Bob'), 
NULL]))\n"
+        + "select e.EXPR$0\n"
+        + "from orders, UNNEST(orders.data) as e")
+        .type(actualType -> {

Review Comment:
   I assume you mean: "none of the values in any ROW is null."
   That case was covered before. ROWs with null values were not handled 
correctly.



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