xiedeyantu commented on code in PR #5018:
URL: https://github.com/apache/calcite/pull/5018#discussion_r3408841376
##########
core/src/test/java/org/apache/calcite/test/SqlValidatorTest.java:
##########
@@ -2197,6 +2197,32 @@ void testLikeAndSimilarFails() {
.fails("ROW\\(\\* EXCLUDE/EXCEPT list\\) cannot exclude all columns");
}
+ /** Test case for
+ * <a
href="https://issues.apache.org/jira/browse/CALCITE-7603">[CALCITE-7603]
+ * Support ROW constructors that name fields</a>. */
+ @Test void testRowWithFieldNames() {
+ // All fields named: the returned type should use the specified names
+ sql("select row(1 as a, 'hello' as b) from emp")
Review Comment:
> This case will fail, the `AS` is not optional in the ROW constructor.
Would you like it to be?
I don't really have a strong preference either way, as long as the features
are clearly defined. I also noticed you added the requirement to use AS, so I'm
all good now.
--
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]