Skip to content

Commit

Permalink
feat: add bool_and and bool_or aggregate functions (#314)
Browse files Browse the repository at this point in the history
  • Loading branch information
vibhatha authored Sep 8, 2022
1 parent de6bc9f commit 52fa523
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions extensions/functions_boolean.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,29 @@ scalar_functions:
- value: boolean?
name: a
return: boolean?

aggregate_functions:
-
name: "bool_and"
description: >
If any value in the input is false, false is returned. If the input is
empty or only contains nulls, null is returned. Otherwise, true is
returned.
impls:
- args:
- value: boolean
name: x
nullability: DECLARED_OUTPUT
return: boolean?
-
name: "bool_or"
description: >
If any value in the input is true, true is returned. If the input is
empty or only contains nulls, null is returned. Otherwise, false is
returned.
impls:
- args:
- value: boolean
name: x
nullability: DECLARED_OUTPUT
return: boolean?

0 comments on commit 52fa523

Please sign in to comment.