You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Spark supports functions which take a "lambda like" function. Here's an example using array_sort
SELECT
array_sort(
ARRAY('bc', 'ab', 'dc'),
(left, right) -> CASE
WHEN left IS NULLAND right IS NULL THEN 0
WHEN left IS NULL THEN -1
WHEN right IS NULL THEN 1
WHEN left < right THEN 1
WHEN left > right THEN -1
ELSE 0
END
);