twalthr commented on code in PR #28298:
URL: https://github.com/apache/flink/pull/28298#discussion_r3458573718


##########
flink-table/flink-sql-parser/src/main/java/org/apache/calcite/sql/SqlCollectionTypeNameSpec.java:
##########
@@ -0,0 +1,140 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.calcite.sql;
+
+import org.apache.calcite.rel.type.RelDataType;
+import org.apache.calcite.rel.type.RelDataTypeFactory;
+import org.apache.calcite.sql.parser.SqlParserPos;
+import org.apache.calcite.sql.type.SqlTypeName;
+import org.apache.calcite.sql.validate.SqlValidator;
+import org.apache.calcite.util.Litmus;
+import org.apache.calcite.util.Util;
+
+import java.util.Objects;
+
+import static java.util.Objects.requireNonNull;
+
+/**
+ * A sql type name specification of collection type.
+ *
+ * <p>The grammar definition in SQL-2011 IWD 9075-2:201?(E) 6.1 &lt;collection 
type&gt; is as
+ * following:
+ *
+ * <blockquote>
+ *
+ * <pre>
+ * &lt;collection type&gt; ::=
+ *     &lt;array type&gt;
+ *   | &lt;multiset type&gt;
+ *
+ * &lt;array type&gt; ::=
+ *   &lt;data type&gt; ARRAY
+ *   [ &lt;left bracket or trigraph&gt;
+ *     &lt;maximum cardinality&gt;
+ *     &lt;right bracket or trigraph&gt; ]
+ *
+ * &lt;maximum cardinality&gt; ::=
+ *   &lt;unsigned integer&gt;
+ *
+ * &lt;multiset type&gt; ::=
+ *   &lt;data type&gt; MULTISET
+ * </pre>
+ *
+ * </blockquote>
+ *
+ * <p>This class is intended to describe SQL collection type. It can describe 
either simple
+ * collection type like "int array" or nested collection type like "int array 
array" or "int array
+ * multiset". For nested collection type, the element type name of this {@code
+ * SqlCollectionTypeNameSpec} is also a {@code SqlCollectionTypeNameSpec}.
+ *
+ * <p>The class is copied from Calcite because of 1.40.0 regression at 
CALCITE-1466. Flink

Review Comment:
   Is there a ticket already that we can watch for dropping this class again?



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