@Udf
  public <T> List<T> remove(
      @UdfParameter(description = "Array of values") final List<T> array,
      @UdfParameter(description = "Value to remove") final T victim) {
    if (array == null) {
      return null;
    }

    return array.stream()
        .filter(el -> !Objects.equals(el, victim))
        .collect(Collectors.toList());
  }
@Test
  public void shouldRemoveDoubles() {
    final List<Double> input1 = Arrays.asList(1.1, 2.99, 1.1, 3.0);
    final Double input2 = 1.1;
    final List<Double> result = udf.remove(input1, input2);
    assertThat(result, contains(2.99, 3.0));
  }