Github user icexelloss commented on the issue:

    https://github.com/apache/spark/pull/20217
  
    My two cents:
    
    I kind of like the PySpark API `registerUDF`. I think the API is simple and 
clear, comparing to the alternative (merging this API to `registerFunction` and 
throwing an error in case that `f` is a UDF and `returnType` is set)
    
    I think we can even go a little further to deprecate the 
`registerFunction(name, f, returnType)` API if we want - It's the same as 
`registerUDF(name, udf(f, returnType))`, to reduce the API surface. 
    
    I also don't think it's super important to be same as Scala API there 
because Python doesn't have the same type system as Scala.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to