presto returns a NaN, even if there is a NULL in the array. However, for other types, it always returns NULL if one exists. As a part of fixing the NaN behavior under this RFC (https://github.com/prestodb/rfcs/blob/main/RFC-0001-nan-definition.md), it would be good to also make the behavior consistent across types for nulls and always return null if it exists.
select ARRAY_MIN(array[1, 3, NULL , 3]); ---- NULL
select ARRAY_MIN(array['a','b', NULL, 'c']); ---- NULL
select ARRAY_MIN(array[1, nan(), NULL , 3]); ---- nan
Similarly for array_max
select ARRAY_MAX(array['a','b', NULL, 'c']); ---- NULL
select ARRAY_MAX(array[1, 3, NULL , 3]); ---- NULL
select ARRAY_MAX(array[1, nan(), NULL , 3]); ---- nan