aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/sql/suites/binding/tie_scalar_context.sql
blob: 162de996b07e525136120418333be56939864c4d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* syntax version 1 */
/* postgres can not */

$foo = ($x) -> {
    return AsTuple($x, $x);
};

$ids = (
    SELECT AGGREGATE_LIST(id) 
    FROM (
        select "1" as id union all select "2" as id
    )
);


$first_ids, $second_ids = $foo(unwrap($ids));
select $first_ids as one, $second_ids as two;