blob: a1635ae3e2267d4f01f2cfae646a8218a81a459e (
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
|
/* syntax version 1 */
/* postgres can not */
USE plato;
pragma config.flags("UdfSupportsYield","false");
$s = @@
import yql
def f(input, a):
for x in input:
yield x
@@;
$f = Python::f(Callable<(Stream<Struct<key:String,subkey:String,value:String>>,Int32)->Stream<Struct<key:String,subkey:String,value:String>>>, $s);
SELECT * FROM (
PROCESS Input using $f(TableRows(), 1)
UNION ALL
PROCESS Input using $f(TableRows(), 2)
) AS x
ORDER BY key, subkey, value
;
|