blob: 132b492b4ccabe3412d353d7a934732f087381ae (
plain) (
blame)
1
2
3
4
5
6
7
8
9
|
/* postgres can not */
USE plato;
$udf = YQL::@@(lambda '(key stream) (AsStruct
'('key key) '('summ (Collect (Condense stream (Uint32 '0) (lambda '(item state) (Bool 'False)) (lambda '(item state) (Add state item)))))
))@@;
--INSERT INTO Output
DISCARD REDUCE Input1 ON key USING $udf(cast(value as uint32) ?? 0);
|