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

(let list (AsList (String 'a) (String 'b) (String 'c)))
(let data (Condense1 list
   (lambda '(item)
       (AddMember 
          (Struct) 
          'z 
          item))
   (lambda '(item state) (Bool 'false))
   (lambda '(item state) 
       (AddMember 
          (Struct) 
          'z 
          (Concat (Member state 'z) item)))))
(let res_sink (DataSink 'result))
(let world (Write! world res_sink
    (Key)
    data '()))

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