Skip to content

Commit 25f81a6

Browse files
lmanganiauxten
authored andcommitted
Create udf.py
1 parent 2f6f2e8 commit 25f81a6

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

examples/udf.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/usr/bin/env python
2+
3+
from chdb.udf import chdb_udf
4+
from chdb import query
5+
6+
@chdb_udf()
7+
def sum_udf(lhs, rhs):
8+
return int(lhs) + int(rhs)
9+
10+
print(query("select sum_udf(12,22)"))

0 commit comments

Comments
 (0)