@Udf
  public <T extends Comparable<? super T>> List<T> arraySortDefault(@UdfParameter(
      description = "The array to sort") final List<T> input) {
    return arraySortWithDirection(input, "ASC");
  }
@Test
  public void shouldSortDecimals() {
    final List<BigDecimal> input =
        Arrays.asList(BigDecimal.valueOf(1.2), BigDecimal.valueOf(1.3), BigDecimal.valueOf(-1.2));
    final List<BigDecimal> output = udf.arraySortDefault(input);
    assertThat(output,
        contains(BigDecimal.valueOf(-1.2), BigDecimal.valueOf(1.2), BigDecimal.valueOf(1.3)));
  }