snuyanzin commented on code in PR #28155:
URL: https://github.com/apache/flink/pull/28155#discussion_r3236714801
##########
flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/functions/CollectionFunctionsITCase.java:
##########
@@ -1602,6 +1603,47 @@ private Stream<TestSetSpec> arraySortTestCases() {
DataTypes.ARRAY(DataTypes.DATE())));
}
+ private Stream<TestSetSpec> arraySortBigIntDuplicatesTestCases() {
+ final int size = 64;
+ Long[] allEqual = new Long[size];
+ java.util.Arrays.fill(allEqual, 42L);
+
+ Long[] manyDuplicates = new Long[size];
+ for (int i = 0; i < size; i++) {
+ manyDuplicates[i] = (long) (i % 4);
+ }
+ Long[] manyDuplicatesSortedAsc = manyDuplicates.clone();
+ java.util.Arrays.sort(manyDuplicatesSortedAsc);
+ Long[] manyDuplicatesSortedDesc = manyDuplicatesSortedAsc.clone();
+ for (int i = 0, j = size - 1; i < j; i++, j--) {
+ Long tmp = manyDuplicatesSortedDesc[i];
+ manyDuplicatesSortedDesc[i] = manyDuplicatesSortedDesc[j];
+ manyDuplicatesSortedDesc[j] = tmp;
+ }
Review Comment:
Can we just use `ArrayUtils.reverse()`?
--
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]