Skip to content

Commit

Permalink
[SPARK-9101] [PySpark] Test for selecting null literal
Browse files Browse the repository at this point in the history
  • Loading branch information
Mateusz Buśkiewicz committed Jul 20, 2015
1 parent 97e3f2f commit dd75aa6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions python/pyspark/sql/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,10 @@ def test_infer_nested_schema(self):
df = self.sqlCtx.inferSchema(rdd)
self.assertEquals(Row(field1=1, field2=u'row1'), df.first())

def test_select_null_literal(self):
df = self.sqlCtx.sql("select null as col")
self.assertEquals(Row(col=None), df.first())

def test_apply_schema(self):
from datetime import date, datetime
rdd = self.sc.parallelize([(127, -128, -32768, 32767, 2147483647, 1.0,
Expand Down

0 comments on commit dd75aa6

Please sign in to comment.