aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/s-expressions/suites/InMem/NthOpt.yqls
blob: 428da2f45f8def0e4e711de1669588d29b1245c0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
(
#comment
(let config (DataSource 'config))
(let world (Configure! world config 'PureDataSource 'yt))

(let res_sink (DataSink 'result))
(let t '(
  (String 'aaa)
  (Just (Uint32 '4))
  (Nothing (OptionalType (DataType 'Uint32)))
))

(let jt (Just t))
(let n (Nothing (TypeOf jt)))

(let world (Write! world res_sink (Key) (Nth t '0) '()))
(let world (Write! world res_sink (Key) (Nth jt '0) '()))
(let world (Write! world res_sink (Key) (Nth jt '1) '()))
(let world (Write! world res_sink (Key) (Nth jt '2) '()))
(let world (Write! world res_sink (Key) (Nth n '0) '()))
(let world (Write! world res_sink (Key) (Nth n '2) '()))

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