ifddlZdejdejfdejdejffdZdS)Nfunc.returncddl}ddlm}||j|j|j|j|j}ddl }i}||}|j D]}|j j ||<||_ |S)zDecorate 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. rN) signature)typesinspectr FunctionType__code__ __globals____name__ __defaults__ __closure__pyarrow parameterslib ChunkedArray__annotations__)rrrnew_funcpanew_annotationssigparams r sT V_S&*_5&/#vz/:Zr