diff options
author | udovichenko-r <udovichenko-r@yandex-team.com> | 2024-11-18 18:00:20 +0300 |
---|---|---|
committer | udovichenko-r <udovichenko-r@yandex-team.com> | 2024-11-18 18:32:34 +0300 |
commit | 227883e6978c3b90e91b931488e9dd4c56c350bf (patch) | |
tree | 925008663989d95a31a74a4f6e19886ecb47bd47 /yql/essentials/tests/s-expressions/suites/ImplictCasts/InsideVariantLiteral.yql | |
parent | 0dc8d9e60034615bb2e67687bfd94a4ea3e7296f (diff) | |
download | ydb-227883e6978c3b90e91b931488e9dd4c56c350bf.tar.gz |
YQL-19206 Move contrib/ydb/library/yql/tests/s-expressions/suites -> yql/essentials/tests/s-expressions/suites
commit_hash:02beb73b0c072658a9f2dc8bd9762791936b4e29
Diffstat (limited to 'yql/essentials/tests/s-expressions/suites/ImplictCasts/InsideVariantLiteral.yql')
-rw-r--r-- | yql/essentials/tests/s-expressions/suites/ImplictCasts/InsideVariantLiteral.yql | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/yql/essentials/tests/s-expressions/suites/ImplictCasts/InsideVariantLiteral.yql b/yql/essentials/tests/s-expressions/suites/ImplictCasts/InsideVariantLiteral.yql new file mode 100644 index 0000000000..bbc1bfa584 --- /dev/null +++ b/yql/essentials/tests/s-expressions/suites/ImplictCasts/InsideVariantLiteral.yql @@ -0,0 +1,29 @@ +( +(let config (DataSource 'config)) +(let world (Configure! world config 'PureDataSource 'yt)) +(let res_sink (DataSink 'result)) + +# Variant over struct + +(let vt (ParseType '"Variant<Int64, Struct<A:Int64, B:Double>>")) +(let vt2 (ParseType '"Variant<Int32, Struct<A:Int32, B:Double>>")) + +(let testcase1 (AsList (Variant (Int64 '10) '0 vt))) +(let testcase1 (Append testcase1 (Variant (Int32 '11) '0 vt2))) +(let testcase1 (Append testcase1 (Variant (AsStruct '('A (Int64 '25)) '('B (Double '15.5))) '1 vt2))) + +# Variant over tuple + +(let vts (ParseType '"Variant<A:Int64, B:Struct<A:Int64, B:Double>>")) +(let vts2 (ParseType '"Variant<A:Int32, B:Struct<A:Int32, B:Double>>")) +(let vts3 (ParseType '"Variant<A:Int32>")) + +(let testcase2 (AsList (Variant (Int64 '10) 'A vts))) +(let testcase2 (Append testcase2 (Variant (Int32 '11) 'A vts2))) +(let testcase2 (Append testcase2 (Variant (AsStruct '('A (Int64 '25)) '('B (Double '15.5))) 'B vts2))) +(let testcase2 (Append testcase2 (Variant (Int32 '11) 'A vts3))) + +(let world (Write! world res_sink (Key) '(testcase1 testcase2) '('('type)))) +(let world (Commit! world res_sink)) +(return world) +) |