aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/sql/suites/action/eval_if.sql
blob: f64665fd69d47275ee44ae0b342e6dc55833ffd0 (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 */
USE plato;

define action $action1($x) as
  select $x;
end define;

evaluate if CAST(Unicode::ToUpper("i"u) AS String) == "I"
    do $action1(1)
else
    do $action1(2);

evaluate if CAST(Unicode::ToUpper("i"u) AS String) != "I"
    do $action1(3);

evaluate if CAST(Unicode::ToUpper("i"u) AS String) == "I"
    do $action1(4);