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

(let res_sink (DataSink 'result))
(let outLambda (lambda '(sep) (block '(
   (let data (AsList (String 'a) (String 'b)))
   (let data1 (Map data (lambda '(x) (Concat x sep))))
   (let data2 (Map data (lambda '(y) (Concat y sep))))
   (let res (Extend data1 data2))
   (return res)
))))
(let predicate (== (Int32 '1) (Int32 '2)))
(let sep (If predicate (Just (String '_)) (Just (String '+))))
(let data (IfPresent sep outLambda (AsList (String 'none))))
(let world (Write! world res_sink (Key) data '()))
(let world (Commit! world res_sink))
(return world)
)