Github user mgaido91 commented on a diff in the pull request: https://github.com/apache/spark/pull/21025#discussion_r180431349 --- Diff: python/pyspark/sql/functions.py --- @@ -2080,6 +2080,21 @@ def size(col): return Column(sc._jvm.functions.size(_to_java_column(col))) +@since(2.4) +def array_min(col): + """ + Collection function: returns the minimum value of the array. + + :param col: name of column or expression + + >>> df = spark.createDataFrame([([2, 1, 3],), ([None, 10, -1],)], ['data']) + >>> df.select(array_min(df.data).alias('min')).collect() + [Row(min=1), Row(min=-1)] + """ --- End diff -- you are right, good catch! I was looking for reference at the `sort_array` function below which has the same issue. I will fix it there too, thanks.
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org