public static long[] toLongArray(List<Long> list) {
    return list.stream().mapToLong(Long::valueOf).toArray();
  }
cast {@code ArrayList<Long>} to {@code long[]}.

@param list ArrayList to cast
@return cast result
library-udf/src/main/java/org/apache/iotdb/library/util/Util.java