From 39f743a6231cbd8cc770a28f43ee601eff28d597 Mon Sep 17 00:00:00 2001 From: zero323 Date: Mon, 28 Mar 2016 14:51:36 -0700 Subject: [SPARK-14202] [PYTHON] Use generator expression instead of list comp in python_full_outer_jo… MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## 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 Closes #11998 from zero323/pyspark-join-generator-expr. --- python/pyspark/join.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'python') 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) -- cgit v1.2.3