snuyanzin commented on code in PR #22834:
URL: https://github.com/apache/flink/pull/22834#discussion_r1251861157


##########
flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/functions/CollectionFunctionsITCase.java:
##########
@@ -479,4 +480,258 @@ private Stream<TestSetSpec> arrayUnionTestCases() {
                                 "Invalid input arguments. Expected signatures 
are:\n"
                                         + "ARRAY_UNION(<COMMON>, <COMMON>)"));
     }
+
+    private Stream<TestSetSpec> arraySliceTestCases() {
+        return Stream.of(
+                TestSetSpec.forFunction(BuiltInFunctionDefinitions.ARRAY_SLICE)
+                        .onFieldsWithData(
+                                new Integer[] {null, 1, 2, 3, 4, 5, 6, null},
+                                null,
+                                new Row[] {
+                                    Row.of(true, LocalDate.of(2022, 4, 20)),
+                                    Row.of(true, LocalDate.of(1990, 10, 14)),
+                                    null
+                                },
+                                new String[] {"a", "b", "c", "d", "e"},
+                                new Integer[] {1, 2, 3, 4, 5})
+                        .andDataTypes(
+                                DataTypes.ARRAY(DataTypes.INT()),
+                                DataTypes.ARRAY(DataTypes.INT()),
+                                DataTypes.ARRAY(
+                                        DataTypes.ROW(DataTypes.BOOLEAN(), 
DataTypes.DATE())),
+                                DataTypes.ARRAY(DataTypes.STRING()),
+                                DataTypes.ARRAY(DataTypes.INT()))
+                        .testResult(

Review Comment:
   Since for every tests it will be created a flink job we should care about 
test time. 
   I guess we could remove tests which are testing cases tested by other tests
   e.g.
   ```java
   .testResult(
           $("f4").arraySlice(0, -7),
           "ARRAY_SLICE(f4, 0, -7)",
           new Integer[] {},
           DataTypes.ARRAY(DataTypes.INT()))
   .testResult(
           $("f4").arraySlice(1, -7),
           "ARRAY_SLICE(f4, 1, -7)",
           new Integer[] {},
           DataTypes.ARRAY(DataTypes.INT()))
   ```
   these two goes to the same test case when `end` is lower than `right`
   so we could leave only one of them and drop another
   



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