Iam currently working on a duckdb udf using pyarrow compute. Works great so far. Now i need to clip a value between 0 and 1, e.g minimal example: import numpy as np import pyarrow as pa import pyarrow.compute as pc import duckdb def funcArrow(x: float) -> float: return np.clip(x, 0, 1) # this should be something like pc.clip(x,0,1) con = duckdb.connect("test.db") con.create_function("funcArrow", funcArrow, type="arrow") print(con.sql("SELECT funcArrow(x) AS f from myTable;") I tried using pc.min, pc.max or if else loops, but always run into errors. Any suggestions? Thank you Continue reading...