aboutsummaryrefslogtreecommitdiff
path: root/R
diff options
context:
space:
mode:
authorzero323 <zero323@users.noreply.github.com>2017-02-15 10:16:34 -0800
committerHolden Karau <holden@us.ibm.com>2017-02-15 10:16:34 -0800
commitc97f4e17de0ce39e8172a5a4ae81f1914816a358 (patch)
tree54e6fd3ea35bec6f2350b0459e62db229931de6f /R
parent6eca21ba881120f1ac7854621380ef8a92972384 (diff)
downloadspark-c97f4e17de0ce39e8172a5a4ae81f1914816a358.tar.gz
spark-c97f4e17de0ce39e8172a5a4ae81f1914816a358.tar.bz2
spark-c97f4e17de0ce39e8172a5a4ae81f1914816a358.zip
[SPARK-19160][PYTHON][SQL] Add udf decorator
## What changes were proposed in this pull request? This PR adds `udf` decorator syntax as proposed in [SPARK-19160](https://issues.apache.org/jira/browse/SPARK-19160). This allows users to define UDF using simplified syntax: ```python from pyspark.sql.decorators import udf udf(IntegerType()) def add_one(x): """Adds one""" if x is not None: return x + 1 ``` without need to define a separate function and udf. ## How was this patch tested? Existing unit tests to ensure backward compatibility and additional unit tests covering new functionality. Author: zero323 <zero323@users.noreply.github.com> Closes #16533 from zero323/SPARK-19160.
Diffstat (limited to 'R')
0 files changed, 0 insertions, 0 deletions