aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/sql/suites/expr/cast_struct.sql
blob: 1fd1cd914be65e9b984ea05cc687b1f127437ba1 (plain) (blame)
1
2
3
4
5
6
7
8
/* postgres can not */
/* syntax version 1 */
$struct = <|du:3.14, fl:-1.f, i:0, s:"str"u, u:123u|>;
select
    CAST($struct AS Struct<>) as empty,
    CAST($struct AS Struct<du:Uint32?, fl:Uint32?, s:Uint16?, u:Int32?>) as partial,
    CAST($struct AS Struct<x:Uint8?, y:Uint16?, z:Int8?>) as others,
    CAST($struct AS Struct<du:Uint32, fl:Uint32, s:Uint16, u:Int32>) as fail;