aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/sql/suites/action/subquery_merge_evaluate.sql
blob: 25c3a000fa1e8fa2f7fb24e1d4bd23923155c505 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* syntax version 1 */
/* postgres can not */
use plato;

define subquery $sub1($i,$j?) as
   select $i - 1,$j;
end define;

define subquery $sub2($i,$j?) as
   select $i + 1,$j;
end define;

$sub = EvaluateCode(If(1>2,QuoteCode($sub1),QuoteCode($sub2)));

$s = SubqueryExtendFor([1,2,3],$sub);
process $s();