aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/sql/suites/produce/process_with_udf_rows.sql
blob: 3df9f4df1be35a2cc6d045ca134960b3dbf177e7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* postgres can not */
$udf = Python::process(
Callable<
    ()->Stream<Struct<result:Int64>>
>, @@
def process():
    for row in range(10):
        result = row
        yield locals()
@@);

$users = (
    SELECT `key` AS age, `value` AS name FROM plato.Input0
);

PROCESS $users
USING $udf();