tihom88 commented on code in PR #1135:
URL: https://github.com/apache/jackrabbit-oak/pull/1135#discussion_r1348495689
##########
oak-commons/src/main/java/org/apache/jackrabbit/oak/commons/sort/ExternalSort.java:
##########
@@ -460,11 +602,21 @@ public static <T> File sortAndSave(List<T> tmplist,
* @param typeToString
* function to map string to custom type. User for coverting line
to custom type for the
* purpose of sorting
+ * @param filterPredicate
+ * predicate to filter out data which need to be sorted
*/
public static <T> File sortAndSave(List<T> tmplist,
Comparator<T> cmp, Charset cs, File
tmpdirectory,
- boolean distinct, Compression
algorithm, Function<T, String> typeToString) throws IOException {
- Collections.sort(tmplist, cmp);
+ boolean distinct, Compression algorithm,
+ Function<T, String> typeToString,
+ @Nullable Predicate<T> filterPredicate
+ ) throws IOException {
+ if ( filterPredicate == null){
Review Comment:
Updated code. Also updated comment above, please have a look at it.
--
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]