Skip to content

Commit

Permalink
fix: use only one function and add skip_null option
Browse files Browse the repository at this point in the history
  • Loading branch information
richtia committed Oct 26, 2023
1 parent b44bdcc commit 89b5cbb
Showing 1 changed file with 5 additions and 19 deletions.
24 changes: 5 additions & 19 deletions extensions/functions_comparison.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -218,33 +218,19 @@ scalar_functions:
-
name: "least"
description: >-
Returns the smallest value.
Returns the smallest value. The function will return null if any argument evaluates
to null.
The `null_handling` option specifies how to handle null arguments. If `ANY_NULL`
is specified, the function will return null if any argument evaluate to null.
`ALL_NULLS` means the function will return null only if all arguments evaluate to null.
Enabling the `skip_null` will return null only if all arguments evaluate to null.
String comparison is done in lexicographical ordering, one character at a time, from
left to right. Uppercase letters are less than lowercase letters.
impls:
- args:
- value: T
options:
null_handling:
values: [ ANY_NULL, ALL_NULLS ]
variadic:
min: 2
return: T|?
-
name: "least_skip_null"
description: >-
Returns the smallest value. Skip any null arguments.
String comparison is done in lexicographical ordering, one character at a time, from
left to right. Uppercase letters are less than lowercase letters.
impls:
- args:
- value: T
skip_null:
values: [ ENABLED ]
variadic:
min: 2
return: T
Expand Down

0 comments on commit 89b5cbb

Please sign in to comment.