This adds docs for the `mv_min` function. It uses an as yet unsupported syntax, `ROW a=[2,1]`, but I think we'll support it before long.
@@ -15,6 +15,7 @@ these functions:
* <<esql-is_nan>>
* <<esql-is_null>>
* <<esql-length>>
+* <<esql-mv_min>>
* <<esql-pow>>
* <<esql-round>>
* <<esql-split>>
@@ -161,6 +162,8 @@ FROM employees
| EVAL fn_length = LENGTH(first_name)
----
+include::functions/mv_min.asciidoc[]
+
[[esql-pow]]
=== `POW`
Returns the the value of a base (first argument) raised to a power (second
@@ -0,0 +1,18 @@
+[[esql-mv_min]]
+=== `MV_MIN`
+Converts a multivalued field into a single valued field containing the minimum value. For example:
+[source,esql]
+----
+include::{esql-specs}/math.csv-spec[tag=mv_min]
+include::{esql-specs}/math.csv-spec[tag=mv_min-result]
+It can be used by any field type, including `keyword` fields. In that case picks the
+first string, comparing their utf-8 representation byte by byte:
+include::{esql-specs}/string.csv-spec[tag=mv_min]
+include::{esql-specs}/string.csv-spec[tag=mv_min-result]