Skip to content
Snippets Groups Projects
Commit 39f743a6 authored by zero323's avatar zero323 Committed by Davies Liu
Browse files

[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.
parent ff3bea38
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment