Description
Ref: https://prestodb.io/docs/current/functions/array.html
Constructs an array from those elements of array for which function returns true:
SELECT filter(ARRAY [], x -> true); -- [] SELECT filter(ARRAY [5, -6, NULL, 7], x -> x > 0); -- [5, 7] SELECT filter(ARRAY [5, NULL, 7, NULL], x -> x IS NOT NULL); -- [5, 7]