aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/sql/suites/expr/xor.sql
blob: 3799af42764fc1073ccfc9b79aa4de8818c51eeb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* postgres can not */
SELECT
    o1 XOR o2 AS xor,
    o1 XOR o1 AS xor_same_o1,
    o2 XOR o2 AS xor_same_o2,
    o1 XOR o2 XOR o1 XOR o2 XOR o1 XOR o2 AS xor_triple_dups,
    o1 XOR o2 XOR Unwrap(o1) XOR Unwrap(o2) AS xor_with_unwraps,
FROM AS_TABLE([
    <|o1: FALSE, o2: FALSE|>,
    <|o1: TRUE, o2: TRUE|>,
    <|o1: TRUE, o2: FALSE|>,
    <|o1: FALSE, o2: TRUE|>,
    <|o1: TRUE, o2: NULL|>,
    <|o1: FALSE, o2: NULL|>,
    <|o1: NULL, o2: TRUE|>,
    <|o1: NULL, o2: FALSE|>
]);