@Udf
  public <T> List<T> concat(
      @UdfParameter(description = "First array of values") final List<T> left,
      @UdfParameter(description = "Second array of values") final List<T> right) {
    if (left == null && right == null) {
      return null;
    }
    final int leftSize = left != null ? left.size() : 0;
    final int rightSize = right != null ? right.size() : 0;
    final List<T> result = new ArrayList<>(leftSize + rightSize);
    if (left != null) {
      result.addAll(left);
    }
    if (right != null) {
      result.addAll(right);
    }
    return result;
  }
@Test
  public void shouldReturnNullForAllNullInputs() {
    final List<Long> result = udf.concat((List<Long>) null, (List<Long>) null);
    assertThat(result, is(nullValue()));
  }