1234567891011121314151617181920212223 |
- (
- #comment
- (let config (DataSource 'config))
- (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)
- )
|