aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/sql/suites/expr/list_takeskipwhile.sql
blob: 8101dded6d38b0a60466d7e08b172483e586a033 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
/* postgres can not */
/* syntax version 1 */
$a = AsList(1,2,3,1,2,3);

select
    ListTakeWhile($a,($x)->{return $x<3}),
    ListSkipWhile($a,($x)->{return $x<3}),
    Yql::Collect(YQL::TakeWhile(Yql::Iterator($a,Yql::DependsOn(1)),($x)->{return $x<3})),
    Yql::Collect(YQL::SkipWhile(Yql::Iterator($a,Yql::DependsOn(2)),($x)->{return $x<3})),
    Yql::TakeWhile(Just(1),($x)->{return $x<3}),
    Yql::SkipWhile(Just(1),($x)->{return $x<3});