aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/s-expressions/suites/Optimizers/CondenseOneItemTuple.yqls
blob: 2693aea42384129c1f88aa672e1e87057aee2acc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
(
(let config (DataSource 'config))

(let list (AsList (String 'a) (String 'b) (String 'c)))
(let s (String '""))
(let data (Condense list '(s)
   (lambda '(item state) (Bool 'false))
   (lambda '(item state) (block '(
      (let state (Concat (Nth state '0) item))
      (return '(state)))))))
(let res_sink (DataSink 'result))
(let world (Write! world res_sink
    (Key)
    data '('('type))))

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