o
    ñ²i  ã                   @   s6   d dl Z de jde jf de jde jf fdd„ZdS )é    NÚfunc.Úreturnc                 C   sf   ddl }ddlm} | | j| j| j| j| j¡}ddl	}i }|| ƒ}|j
D ]}|jj||< q%||_|S )zÈDecorate a function with annotated function parameters.

    This allows DuckDB to infer that the function should be provided with pyarrow arrays and should expect
    pyarrow array(s) as output.
    r   N)Ú	signature)ÚtypesÚinspectr   ÚFunctionTypeÚ__code__Ú__globals__Ú__name__Ú__defaults__Ú__closure__ÚpyarrowÚ
parametersÚlibÚChunkedArrayÚ__annotations__)r   r   r   Únew_funcÚpaÚnew_annotationsÚsigÚparam© r   ú>/home/ubuntu/.local/lib/python3.10/site-packages/duckdb/udf.pyÚ
vectorized   s   
r   )ÚtypingÚCallableÚAnyr   r   r   r   r   Ú<module>   s   .