dask-sql
dask-sql copied to clipboard
[DF] Add handling for overloaded UDFs
This PR changes the implementation of DaskFunctions to support overloaded UDF definitions:
- the
return_typeattribute has been replaced withreturn_types, aHashMap<Vec<PyDataType>, PyDataType>, mapping the potential input types of a UDF to its return type - this mapping is updated whenever an overloaded UDF definition is introduced
- the mapping is used as part of the
ScalarUDF'sReturnTypeFunctionto assert which return type should be used for the given UDF call
Additional things that need to be done:
- [ ] clean up the implementation to cut down on unnecessary clones
- [ ] add handling to drop
DaskFunctionswhenreplace=Trueforregister_function