blob: 41d9c9be0e02579743b952046eaf90879da930cb (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
/* syntax version 1 */
/* postgres can not */
/* dq file can not */
$udfScript = @@
def MyFunc(stream):
return stream
@@;
$record = (SELECT TableRow() FROM plato.Input);
$recordType = TypeOf(Unwrap($record));
$streamType = StreamType(VariantType(TupleType($recordType, $recordType, $recordType)));
$udf = Python3::MyFunc(CallableType(0, $streamType, $streamType), $udfScript);
$src = (select * from plato.Input where key > "200");
$i, $j, $k = (PROCESS plato.Input, (select * from plato.Input where key > "100"), $src USING $udf(TableRows()));
select * from $i;
select * from $j;
select * from $k;
|