diff options
author | zero323 <matthew.szymkiewicz@gmail.com> | 2016-03-28 14:51:36 -0700 |
---|---|---|
committer | Davies Liu <davies.liu@gmail.com> | 2016-03-28 14:51:36 -0700 |
commit | 39f743a6231cbd8cc770a28f43ee601eff28d597 (patch) | |
tree | efa036da08514c5ff6eeb0635527d3cbb61f9ca4 | |
parent | ff3bea38ed2ac8dac5832f0bf8eac70192a512ef (diff) | |
download | spark-39f743a6231cbd8cc770a28f43ee601eff28d597.tar.gz spark-39f743a6231cbd8cc770a28f43ee601eff28d597.tar.bz2 spark-39f743a6231cbd8cc770a28f43ee601eff28d597.zip |
[SPARK-14202] [PYTHON] Use generator expression instead of list comp in python_full_outer_jo…
## What changes were proposed in this pull request?
This PR replaces list comprehension in python_full_outer_join.dispatch with a generator expression.
## How was this patch tested?
PySpark-Core, PySpark-MLlib test suites against Python 2.7, 3.5.
Author: zero323 <matthew.szymkiewicz@gmail.com>
Closes #11998 from zero323/pyspark-join-generator-expr.
-rw-r--r-- | python/pyspark/join.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/python/pyspark/join.py b/python/pyspark/join.py index 94df399016..c1f5362648 100644 --- a/python/pyspark/join.py +++ b/python/pyspark/join.py @@ -93,7 +93,7 @@ def python_full_outer_join(rdd, other, numPartitions): vbuf.append(None) if not wbuf: wbuf.append(None) - return [(v, w) for v in vbuf for w in wbuf] + return ((v, w) for v in vbuf for w in wbuf) return _do_python_join(rdd, other, numPartitions, dispatch) |