Function bool_or_append_only

Source
fn bool_or_append_only(state: bool, input: bool) -> bool
Expand description

Returns true if any non-null input value is true, otherwise false.

ยงExample

statement ok
create table t (b1 boolean, b2 boolean, b3 boolean, b4 boolean);

query T
select bool_or(b1) from t;
----
NULL

statement ok
insert into t values
    (true,  null, false, null),
    (false, true, null,  null),
    (null,  true, false, null);

query TTTTTT
select
    bool_or(b1),
    bool_or(b2),
    bool_or(b3),
    bool_or(b4),
    bool_or(NOT b2),
    bool_or(NOT b3)
FROM t;
----
t t f NULL f t

statement ok
drop table t;