liuyongvs commented on code in PR #3212:
URL: https://github.com/apache/calcite/pull/3212#discussion_r1209647600
##########
core/src/main/java/org/apache/calcite/sql/type/ReturnTypes.java:
##########
@@ -487,6 +487,18 @@ public static SqlCall stripSeparator(SqlCall call) {
-1);
};
+ /**
+ * Returns the element type of a ARRAY or MULTISET.
+ *
+ * <p>For example, given <code>INTEGER ARRAY or MULTISET ARRAY</code>,
returns
+ * <code>INTEGER</code>.
+ */
+ public static final SqlReturnTypeInference TO_COLLECTION_ELEMENT =
+ ARG0.andThen(SqlTypeTransforms.TO_COLLECTION_ELEMENT_TYPE);
Review Comment:
@MasseGuillaume
it doesn't faill, because array() type is UNKNOWN NOT NULL ARRAY NOT NULL,
so the TO_COLLECTION_ELEMENT will return UNKNOWN NOT NULL
--
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]