aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/sql/suites/params/variant.sql
blob: cd7c477a613b86aa41534be73891cc4b11dbc90a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
/* syntax version 1 */

-- underlying type is tuple
declare $x1 as Variant<String, Int64>;
declare $x2 as Variant<String, Int64>;

-- underlying type is struct
declare $x3 as Variant<a:String, b:Int64>;
declare $x4 as Variant<a:String, b:Int64>;
declare $x5 as Variant<a:String, b:Int64>;

select $x1.0 || cast($x2.1 as String) || $x3.a || cast($x4.b as String) || $x5.a;