aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/sql/suites/in/in_ansi_set.sql
blob: e1871507de20c5540c531eec2eef51b3f9a79149 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* syntax version 1 */
/* postgres can not */

PRAGMA AnsiInForEmptyOrNullableItemsCollections;

SELECT
    1         IN AsSet(2, 3, null),          -- Nothing<Bool?>
    null      IN SetCreate(Int32),           -- false?
    null      IN AsSet(null),                -- Nothing<Bool?>
    null      IN AsSet(1),                   -- Nothing<Bool?>
    (1, null) IN AsSet((1, 1), (2, 2)),      -- Nothing<Bool?>
    (1, null) IN AsSet((2, 2), (3, 3)),      -- false?
    (1, 2)    IN AsSet((1, null), (2, 2)),   -- Nothing<Bool?>
    (1, 2)    IN AsSet((null, 1), (2, 1)),   -- false?
    (1, 2)    IN AsSet((1, null), (2, 1)),   -- Nothing<Bool?>
;

SELECT
    Just(1)   IN AsSet(1, 2, 3),             -- true?
    1         IN AsSet(Just(2), Just(3)),    -- false?
;