blob: 81326641f1f91d4de2c42538825c54375eb4950a (
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
|
(
#comment
(let config (DataSource 'config))
(let world (Configure! world config 'PureDataSource 'yt))
(let res_sink (DataSink 'result))
(let list (AsList
'((Uint32 '1) (String 'a))
'((Uint32 '2) (String 'b))
'((Uint32 '1) (String 'c))))
(let keyExtractor (lambda '(x) (Nth x '0)))
(let handler (lambda '(x) (Condense1 x
(lambda '(row) '((Nth row '0) (Concat (String '"values:") (ToString (Nth row '1)))))
(lambda '(row state) (AggrNotEquals (Nth row '0) (Nth state '0)))
(lambda '(row state) '((Nth state '0) (Concat (Concat (Nth state '1) (String '" ")) (Nth row '1))))
)))
(let data (PartitionsByKeys (Iterator list) keyExtractor (Void) (Void) handler))
(let data (Collect data))
(let world (Write! world res_sink (Key) data '()))
(let world (Commit! world res_sink))
(return world)
)
|