diff options
author | zero323 <zero323@users.noreply.github.com> | 2017-01-12 01:05:02 -0800 |
---|---|---|
committer | Reynold Xin <rxin@databricks.com> | 2017-01-12 01:05:02 -0800 |
commit | 5db35b312e96dea07f03100c64b58723c2430cd7 (patch) | |
tree | fe983e3cabde5f1abaf28c609cf06a508b561c84 | |
parent | 2c586f506de9e2ba592afae1f0c73b6ae631bb96 (diff) | |
download | spark-5db35b312e96dea07f03100c64b58723c2430cd7.tar.gz spark-5db35b312e96dea07f03100c64b58723c2430cd7.tar.bz2 spark-5db35b312e96dea07f03100c64b58723c2430cd7.zip |
[SPARK-19164][PYTHON][SQL] Remove unused UserDefinedFunction._broadcast
## What changes were proposed in this pull request?
Removes `UserDefinedFunction._broadcast` and `UserDefinedFunction.__del__` method.
## How was this patch tested?
Existing unit tests.
Author: zero323 <zero323@users.noreply.github.com>
Closes #16538 from zero323/SPARK-19164.
-rw-r--r-- | python/pyspark/sql/functions.py | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/python/pyspark/sql/functions.py b/python/pyspark/sql/functions.py index 7fe901a4fb..66d993a814 100644 --- a/python/pyspark/sql/functions.py +++ b/python/pyspark/sql/functions.py @@ -1826,7 +1826,6 @@ class UserDefinedFunction(object): def __init__(self, func, returnType, name=None): self.func = func self.returnType = returnType - self._broadcast = None self._judf = self._create_judf(name) def _create_judf(self, name): @@ -1842,11 +1841,6 @@ class UserDefinedFunction(object): name, wrapped_func, jdt) return judf - def __del__(self): - if self._broadcast is not None: - self._broadcast.unpersist() - self._broadcast = None - def __call__(self, *cols): sc = SparkContext._active_spark_context jc = self._judf.apply(_to_seq(sc, cols, _to_java_column)) |