mihaibudiu commented on code in PR #4082:
URL: https://github.com/apache/calcite/pull/4082#discussion_r1878458712
##########
testkit/src/main/java/org/apache/calcite/test/SqlOperatorTest.java:
##########
@@ -8221,36 +8221,36 @@ void checkArrayReverseFunc(SqlOperatorFixture f0,
SqlFunction function,
+ "and not exceeds the allowed limit.", true);
f1.checkScalar("array_insert(array[1, 2, 3], 3, 4)",
- "[1, 2, 4, 3]", "INTEGER NOT NULL ARRAY NOT NULL");
+ "[1, 2, 4, 3]", "INTEGER ARRAY NOT NULL");
f1.checkScalar("array_insert(array[1, 2, 3], 3, cast(null as integer))",
"[1, 2, null, 3]", "INTEGER ARRAY NOT NULL");
f1.checkScalar("array_insert(array[2, 3, 4], 1, 1)",
- "[1, 2, 3, 4]", "INTEGER NOT NULL ARRAY NOT NULL");
+ "[1, 2, 3, 4]", "INTEGER ARRAY NOT NULL");
f1.checkScalar("array_insert(array[1, 3, 4], -1, 2)",
- "[1, 3, 4, 2]", "INTEGER NOT NULL ARRAY NOT NULL");
+ "[1, 3, 4, 2]", "INTEGER ARRAY NOT NULL");
f1.checkScalar("array_insert(array[1, 3, 4], -3, 2)",
- "[1, 2, 3, 4]", "INTEGER NOT NULL ARRAY NOT NULL");
+ "[1, 2, 3, 4]", "INTEGER ARRAY NOT NULL");
f1.checkScalar("array_insert(array[2, 3, null, 4], -6, 1)",
"[1, null, 2, 3, null, 4]", "INTEGER ARRAY NOT NULL");
Review Comment:
there is no particularly simple way to check this in checkScalar - I think
you would have to analyze the result type to know what the type of values in
the ResultSet is and then you have to analyze each value in the ResultSet.
--
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]