liuyongvs commented on code in PR #3189:
URL: https://github.com/apache/calcite/pull/3189#discussion_r1188211715


##########
core/src/test/java/org/apache/calcite/test/SqlValidatorTest.java:
##########
@@ -6984,9 +6984,9 @@ void testGroupExpressionEquivalenceParams() {
 
   @Test void testCastAsCollectionType() {
     sql("select cast(array[1,null,2] as int array) from (values (1))")
-        .columnType("INTEGER NOT NULL ARRAY NOT NULL");
+        .columnType("INTEGER ARRAY NOT NULL");

Review Comment:
   add this grammer should not support select cast(b as row(f0 int not null, f1 
varchar null) , i will fix it a new pr latter
   
   sql standard below
   ```
   <cast specification> ::=
   CAST <left paren> <cast operand> AS <cast target> <right paren>
   <cast operand> ::=
   <value expression>
   | <implicitly typed value specification>
   <cast target> ::=
   <domain name>
   | <data type>
   
   <data type> ::=
   <predefined type>
   | <row type>
   | <path-resolved user-defined type name>
   | <reference type>
   | <collection type>
   
   <row type> ::=
   ROW <row type body>
   <row type body> ::=
   <left paren> <field definition> [ { <comma> <field definition> }... ] <right 
paren>
   
   <field definition> ::=
   <field name> <data type>
   ```



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