aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/s-expressions/suites/Builtins/DivePrefixMembersOpt.yql
blob: aabfde50091098aa713b13106c76e172e9b61c87 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
(
(let config (DataSource 'config))
(let world (Configure! world config 'PureDataSource 'yt))

(let res_sink (DataSink 'result))

(let value (Just (AsStruct '('akey1 (Just (Int8 '1))) '('bkey2 (String 'str)) '('c (Nothing (OptionalType (DataType 'Int32)))))))
(let prefixes '('b 'a 'ak '""))
(let result (DivePrefixMembers value prefixes))
(let world (Write! world res_sink (Key) result '('('type))))

(let value (Nothing (OptionalType (StructType '('akey1 (OptionalType (DataType 'Int8))) '('bkey2 (DataType 'String)) '('c (OptionalType (DataType 'Int32)))))))
(let prefixes '('b 'a 'ak '""))
(let result (DivePrefixMembers value prefixes))
(let world (Write! world res_sink (Key) result '('('type))))

(let world (Commit! world res_sink))
(return world)

)