aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/s-expressions/suites/Optimizers/FuseFlatMapWithStreamLambda.yql
blob: c4585070bf49d808b67b711ddfe34e3a5b42c312 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
(
(let res_sink (DataSink 'result))

(let singleList (AsList (Int32 '1)))
(let optional (/ (Int32 '1) (Int32 '0)))
(let streamLambda (lambda '(x) (Iterator (AsList (Int32 '1) (Int32 '2)))))

(let map1 (Unordered (FlatMap singleList streamLambda)))
(let map2 (Unordered (FlatMap (ToList optional) streamLambda)))

(let world (Write! world res_sink (Key) map1 '('('type))))
(let world (Write! world res_sink (Key) map2 '('('type))))
(let world (Commit! world res_sink))
(return world)
)