Skip to content

array_min / array_max behavior with NaN and NULL #21065

@amitkdutta

Description

@amitkdutta

In Presto, array_max or array_min both returns NAN if at least one element in the array is NAN.

SELECT array_max(ARRAY [4.0, nan(), NULL])  --> NAN
SELECT array_min(ARRAY [4.0, nan(), NULL])  --> NAN

Wondering if the behavior is correct or not.

CC: @kaikalur @prithvip @mbasmanova

Metadata

Metadata

Labels

Type

No type

Projects

Status

✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions