Skip to content
Snippets Groups Projects
  • ksonj's avatar
    98f72dfc
    [SPARK-6553] [pyspark] Support functools.partial as UDF · 98f72dfc
    ksonj authored
    Use `f.__repr__()` instead of `f.__name__` when instantiating `UserDefinedFunction`s, so `functools.partial`s may be used.
    
    Author: ksonj <kson@siberie.de>
    
    Closes #5206 from ksonj/partials and squashes the following commits:
    
    ea66f3d [ksonj] Inserted blank lines for PEP8 compliance
    d81b02b [ksonj] added tests for udf with partial function and callable object
    2c76100 [ksonj] Makes UDFs work with all types of callables
    b814a12 [ksonj] support functools.partial as udf
    98f72dfc
    History
    [SPARK-6553] [pyspark] Support functools.partial as UDF
    ksonj authored
    Use `f.__repr__()` instead of `f.__name__` when instantiating `UserDefinedFunction`s, so `functools.partial`s may be used.
    
    Author: ksonj <kson@siberie.de>
    
    Closes #5206 from ksonj/partials and squashes the following commits:
    
    ea66f3d [ksonj] Inserted blank lines for PEP8 compliance
    d81b02b [ksonj] added tests for udf with partial function and callable object
    2c76100 [ksonj] Makes UDFs work with all types of callables
    b814a12 [ksonj] support functools.partial as udf