You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by da...@apache.org on 2016/03/28 23:51:39 UTC

spark git commit: [SPARK-14202] [PYTHON] Use generator expression instead of list comp in python_full_outer_jo…

Repository: spark
Updated Branches:
  refs/heads/master ff3bea38e -> 39f743a62


[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 <ma...@gmail.com>

Closes #11998 from zero323/pyspark-join-generator-expr.


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/39f743a6
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/39f743a6
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/39f743a6

Branch: refs/heads/master
Commit: 39f743a6231cbd8cc770a28f43ee601eff28d597
Parents: ff3bea3
Author: zero323 <ma...@gmail.com>
Authored: Mon Mar 28 14:51:36 2016 -0700
Committer: Davies Liu <da...@gmail.com>
Committed: Mon Mar 28 14:51:36 2016 -0700

----------------------------------------------------------------------
 python/pyspark/join.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/39f743a6/python/pyspark/join.py
----------------------------------------------------------------------
diff --git a/python/pyspark/join.py b/python/pyspark/join.py
index 94df399..c1f5362 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)
 
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org