class ArrayLength {

  @Udf
  public <T> Integer calcArrayLength(
      @UdfParameter(description = "The array") final List<T> array
  ) {
    if (array == null) {
      return null;
    }
    return array.size();
  }

}