public static double[] toDoubleArray(List<Double> list) {
    return list.stream().mapToDouble(Double::valueOf).toArray();
  }
cast {@code ArrayList<Double>} to {@code double[]}.

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