fn bit_or_append_only<T>(state: T, input: T) -> Twhere
T: BitOr<Output = T>,
Expand description
Computes the bitwise OR of all non-null input values.
ยงExample
statement ok
create table t (a int2, b int4, c int8);
query III
select bit_or(a), bit_or(b), bit_or(c) from t;
----
NULL NULL NULL
statement ok
insert into t values
(1, 1, 1),
(2, 2, 2),
(null, null, null);
query III
select bit_or(a), bit_or(b), bit_or(c) from t;
----
3 3 3
statement ok
drop table t;