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

(let res_sink (DataSink 'result))
(let predicate (== (Int32 '1) (Int32 '2)))
(let outLambda (lambda '(sep) (block '(
   (let data (AsList (String 'a) (String 'b)))
   (let data1 (Map data (lambda '(x) (Concat (Concat x sep) (ToString (Int32 '1))))))
   (return data1)
))))
(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)
)