aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/sql/suites/udf/python_script.sql
blob: cb3c5075c9bc15d7113c274ebabc2e2f93dc9b96 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
/* postgres can not */
/* syntax version 1 */
use plato;
$udfScript = @@
def AppendNum(name, age):
    return name + str(age).encode('utf-8')
@@;

$udf = Python3::AppendNum(Callable<(String, Int32?)->String>, $udfScript);

select $udf(value, cast(subkey as Int32)) as val from Input;