sbroeder commented on code in PR #5271:
URL: https://github.com/apache/calcite/pull/5271#discussion_r4135819926
##########
core/src/test/java/org/apache/calcite/test/SqlValidatorTest.java:
##########
@@ -1201,6 +1201,25 @@ void testDyadicCollateOperator() {
});
}
+ /** 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 testUnnestSingleFieldRow() {
+ sql("select d.a\n"
+ + "from unnest(cast(array[row(1)] as row(a integer) array)) as d")
+ .columnType("INTEGER NOT NULL");
+ // The array's real field name ("A") survives star-expansion too, not just
+ // the synthetic alias ("D").
Review Comment:
Ack. Rerworded
--
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]