Skip to content

Commit c54d904

Browse files
committed
Fix empty map bug.
1 parent 7e64d1e commit c54d904

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

python/pyspark/sql/dataframe.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1334,9 +1334,6 @@ def cast(self, dataType):
13341334
def between(self, lowerBound, upperBound):
13351335
""" A boolean expression that is evaluated to true if the value of this
13361336
expression is between the given columns.
1337-
1338-
>>> df[df.col1.between(lowerBound, upperBound)].collect()
1339-
[Row(col1=5, col2=6, col3=8)]
13401337
"""
13411338
return (self >= lowerBound) & (self <= upperBound)
13421339

python/pyspark/sql/tests.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -439,9 +439,10 @@ def test_rand_functions(self):
439439
assert row[1] >= -4.0 and row[1] <= 4.0, "got: %s" % row[1]
440440

441441
def test_between_function(self):
442-
df = self.sqlCtx.parallelize([Row(a=1, b=2, c=3),
443-
Row(a=2, b=1, c=3),
444-
Row(a=4, b=1, c=4)]).toDF()
442+
df = self.sqlCtx.parallelize([
443+
Row(a=1, b=2, c=3),
444+
Row(a=2, b=1, c=3),
445+
Row(a=4, b=1, c=4)]).toDF()
445446
self.assertEqual([False, True, True],
446447
df.select(df.a.between(df.b, df.c)).collect())
447448

0 commit comments

Comments
 (0)