summaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/s-expressions/suites/Optimizers/ToFlowOverCollect.yqls
blob: 736315d8ae4e2950db50bbeb6acb0cb2f258dfff (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
(
(let config (DataSource 'config))
(let world (Configure! world config '"OptimizerFlags" '"ToFlowOverCollect"))

(let input (AsList
  (Int32 '1)
  (Int32 '2)
  (Int32 '3)
  (Int32 '4)
))

(let output (Collect (FromFlow (Map (ToFlow (Collect (FromFlow (Map (ToFlow input)
    (lambda '(item) (+ item (Int32 '1)))
  ))))
  (lambda '(item) (* item (Int32 '2)))
))))

(let res_sink (DataSink 'result))
(let world (Write! world res_sink (Key) output '('('type))))
(let world (Commit! world res_sink))
(return world)
)