public static <OUTPUT, INPUT extends Comparable<INPUT>> List<OUTPUT> executeLargeInputs(Collection<INPUT> input, Function<List<INPUT>, List<OUTPUT>> function) {
    return executeLargeInputs(input, function, i -> i);
  }
public static < OUTPUT , INPUT extends Comparable < INPUT > > List < OUTPUT > executeLargeInputs ( Collection < INPUT > input , Function < List < INPUT > , List < OUTPUT > > function ) { return executeLargeInputs ( input , function , i -> i ) ; }
Partition by 1000 elements a list of input and execute a function on each part.

The goal is to prevent issue with ORACLE when there's more than 1000 elements in a 'in ('X', 'Y', ...)'
and with MsSQL when there's more than 2000 parameters in a query