aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/sql/suites/expr/empty_list_ops3.sql
blob: f7db80ed73fafe60bc77ebac9cfa61f7745dc94e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/* syntax version 1 */
/* postgres can not */
$pred = ($x)->{ return $x > 0 };

select
    ListExtract([],"a"),
    ListTakeWhile([], $pred),
    ListSkipWhile([], $pred),
    ListTakeWhileInclusive([], $pred),
    ListSkipWhileInclusive([], $pred),
    ListAggregate([], AGGREGATION_FACTORY("Sum")),
    ToDict([]),
    ToMultiDict([]),
    ToSet([]),
    SetIsDisjoint({1, 2, 3}, []),
    SetIncludes({1, 2, 3}, []),
    Yql::Fold([],0,($x,$y)->{return $x+$y}),
    Yql::Fold1([],($x)->{return $x},($x,$y)->{return $x+$y}),
    Yql::FoldMap([],0,($x,$y)->{return ($x+$y,$y)}),
    Yql::Fold1Map([],($x)->{return ($x,$x)},($x,$y)->{return ($x+$y,$y)}),
    Yql::LazyList([]),

    ListExtract(Just([]),"a"),
    ListTakeWhile(Just([]), $pred),
    ListSkipWhile(Just([]), $pred),
    ListTakeWhileInclusive(Just([]), $pred),
    ListSkipWhileInclusive(Just([]), $pred),
    ListAggregate(Just([]), AGGREGATION_FACTORY("Sum")),
    ToDict(Just([])),
    ToMultiDict(Just([])),
    ToSet(Just([])),
    SetIsDisjoint({1, 2, 3}, Just([])),
    SetIncludes({1, 2, 3}, Just([])),