liuyongvs commented on code in PR #3198:
URL: https://github.com/apache/calcite/pull/3198#discussion_r1193149972
##########
testkit/src/main/java/org/apache/calcite/test/SqlOperatorTest.java:
##########
@@ -5349,6 +5368,21 @@ private static void checkIf(SqlOperatorFixture f) {
"INTEGER ARRAY NOT NULL");
}
+ /** Tests {@code ARRAY_SIZE} function from Spark. */
+ @Test void testArraySizeFunc() {
+ final SqlOperatorFixture f0 = fixture();
+ f0.setFor(SqlLibraryOperators.ARRAY_SIZE);
+ f0.checkFails("^array_size(array[1])^",
+ "No match found for function signature ARRAY_SIZE\\(<INTEGER
ARRAY>\\)", false);
+
+ final SqlOperatorFixture f = f0.withLibrary(SqlLibrary.SPARK);
+ f.checkScalar("array_size(array[1])", "1",
Review Comment:
array type and element type is different.
array type nullable which indicates wether it is nullable, the value is null
element type nullable which indicates wether the element is nullable, the
value is [null, ...] like this
--
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]