caicancai commented on code in PR #4194:
URL: https://github.com/apache/calcite/pull/4194#discussion_r1957289621
##########
testkit/src/main/java/org/apache/calcite/test/SqlOperatorTest.java:
##########
@@ -8204,6 +8204,38 @@ void checkRegexpExtract(SqlOperatorFixture f0,
FunctionAlias functionAlias) {
"DECIMAL(19, 0)");
}
+ /** Test case for
+ * <a
href="https://issues.apache.org/jira/browse/CALCITE-6831">[CALCITE-6831]
+ * Add ARRAR_SLICE function (enabled in Hive library)</a>. */
+ @Test void testArraySlice() {
+ SqlOperatorFixture f0 = fixture().setFor(SqlLibraryOperators.ARRAY_SLICE);
+ final List<SqlLibrary> libraries =
+ ImmutableList.of(SqlLibrary.HIVE);
+ final Consumer<SqlOperatorFixture> consumer = f -> {
+ f.checkString("array_slice(array[1,2,3], 1, 2)",
Review Comment:
@xuzifu666 Can you add double type + int type? In Spark, double + int mixed
types will undergo implicit conversion. I am not sure whether this will happen
in Hive.
--
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]