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


##########
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() {

Review Comment:
   Moved the CALCITE-7791 cases into testUnnestAlias itself, since it's the 
same rule-and-exceptions catalog from CALCITE-4305. Added:
    - select d, d.a from R as d — confirms both the alias and the field name 
resolve.
    - a sub-query UNNEST operand case.
    - a WITH ORDINALITY case.
    - NATURAL JOIN and USING cases.
   
   Also added a SqlToRelConverterTest case confirming the plan shape. Dropped 
the standalone testUnnestSingleFieldRow method — its content is now split 
between testUnnestAlias and the new PRESTO-specific test below.



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