Function bit_xor

Source
fn bit_xor<T>(state: T, input: T, _retract: bool) -> T
where T: BitXor<Output = T>,
Expand description

Computes the bitwise XOR of all non-null input values.

ยงExample

statement ok
create table t (a int2, b int4, c int8);

query III
select bit_xor(a), bit_xor(b), bit_xor(c) from t;
----
NULL NULL NULL

statement ok
insert into t values
   (3, 3, 3),
   (6, 6, 6),
   (null, null, null);

query III
select bit_xor(a), bit_xor(b), bit_xor(c) from t;
----
5 5 5

statement ok
drop table t;