aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/sql/suites/expr/cast_variant.sql
blob: f453baed165223b940bc1a5dd4f534f5c83ae8c7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
/* postgres can not */
/* syntax version 1 */
$a = AsEnum("a");
$b = AsEnum("b");
$c = AsEnum("c");
$d = AsEnum("d");

$t = TypeOf([Just($a), Just($b), just($c)]);
select CAST([just($a), just($b), just($d)] AS $t);

$t0 = TypeOf([Just($a), Just($b)]);
select CAST([$c, $d] AS $t0);