aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/sql/suites/expr/inline_call.sql
blob: f93b2b64fcf1c9a3ca2d82c19060451d60bfde25 (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
/* postgres can not */
/* syntax version 1 */
use plato;

$x = AsStruct(1 as a);
select $x.a;

$y = AsTuple(2,3);
select $y.1;

select length("foo");

select Math::Pi();

$f = () -> { 
    return () -> {
        return AsDict(AsTuple("foo",AsList(AsStruct(AsTuple(1) as bar))));
    }
};

select $f()()["foo"][0].bar.0;

select ()->{return 1}();

$type = Callable<()->List<Int32>>;
$g = AsStruct(Yql::Callable($type, ()->{return AsList(1,2,3)}) as foo);
    
select $g.foo()[0];