Skip to content

Commit

Permalink
fix style
Browse files Browse the repository at this point in the history
  • Loading branch information
Davies Liu committed Jan 13, 2017
1 parent 95d73fc commit c45126b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions python/pyspark/sql/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,13 +342,12 @@ def test_udf_in_filter_on_top_of_outer_join(self):
df = df.withColumn('b', udf(lambda x: 'x')(df.a))
self.assertEqual(df.filter('b = "x"').collect(), [Row(a=1, b='x')])

def test_udf_in_filter_on_top_of_inner(self):
def test_udf_in_filter_on_top_of_join(self):
from pyspark.sql.functions import udf
from pyspark.sql.types import BooleanType
left = self.spark.createDataFrame([Row(a=1)])
right = self.spark.createDataFrame([Row(b=1)])
f = udf(lambda a, b: a == b, BooleanType())
df = left.crossJoin(right).filter(f("a","b"))
df = left.crossJoin(right).filter(f("a", "b"))
self.assertEqual(df.collect(), [Row(a=1, b=1)])

def test_udf_without_arguments(self):
Expand Down

0 comments on commit c45126b

Please sign in to comment.