sbroeder commented on code in PR #5271:
URL: https://github.com/apache/calcite/pull/5271#discussion_r4360529872


##########
core/src/test/java/org/apache/calcite/test/SqlToRelConverterTest.java:
##########
@@ -2314,6 +2314,33 @@ private void checkCallTypesConsistent(String sql) {
     sql(sql).ok();
   }
 
+  /**
+   * Test case for
+   * <a 
href="https://issues.apache.org/jira/browse/CALCITE-7791";>[CALCITE-7791]
+   * UNNEST of a single-field ROW array loses the field name when aliased</a>.
+   */
+  @Test void testUnnestSingleFieldRowAliasKeepsFieldName() {
+    final String sql = "select d, d.a\n"
+        + "from unnest(cast(array[row(1)] as row(a integer) array)) as d";
+    sql(sql).ok();
+  }
+
+  @Test void testUnnestSingleFieldRowWithOrdinality() {

Review Comment:
   Renamed the test and added Javadoc comments to both tests



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