Add all_match, any_match and none_match functions for arrays#13734
Add all_match, any_match and none_match functions for arrays#13734wenleix merged 3 commits intoprestodb:masterfrom
Conversation
Cherry-picked from trinodb/trino#1045 Co-authored-by: Xingyuan Lin <xinlin@linkedin.com>
Cherry-picked from: trinodb/trino#1045 Co-authored-by: Xingyuan Lin <xinlin@linkedin.com>
|
cc @kaikalur |
rongrong
left a comment
There was a problem hiding this comment.
Looks good to me overall. Only comments are around documentation.
There was a problem hiding this comment.
Space after T, before boolean => T, boolean
There was a problem hiding this comment.
What about empty array? Every predicate would return true? Is that worth documenting?
There was a problem hiding this comment.
@rongrong : It's already discussed:
(a special case is when the array is empty)
There was a problem hiding this comment.
It doesn't seem that the functions are actually listed in alphabetical order so it probably makes more sense to keep these three functions together.
There was a problem hiding this comment.
@rongrong : Looks to me the functions are listed in alphabetical order? Maybe some functions are not following the ordering strictly (although I didn't see it with skim 😄 ) and we should fix them?
There was a problem hiding this comment.
Maybe it's the array_intersect/union/except that's wrong then. Can you add a follow up PR to fix that? Thanks!
rongrong
left a comment
There was a problem hiding this comment.
Please sign the new CLA.
Cherry-picked from: trinodb/trino#1045 Co-authored-by: Xingyuan Lin <xinlin@linkedin.com>

Backported from trinodb/trino#1045