aboutsummaryrefslogtreecommitdiff
path: root/python/pyspark/sql/tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/pyspark/sql/tests.py')
-rw-r--r--python/pyspark/sql/tests.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/python/pyspark/sql/tests.py b/python/pyspark/sql/tests.py
index 7593b991a7..410efbafe0 100644
--- a/python/pyspark/sql/tests.py
+++ b/python/pyspark/sql/tests.py
@@ -747,6 +747,13 @@ class SQLTests(ReusedPySparkTestCase):
except ValueError:
self.assertEqual(1, 1)
+ def test_metadata_null(self):
+ from pyspark.sql.types import StructType, StringType, StructField
+ schema = StructType([StructField("f1", StringType(), True, None),
+ StructField("f2", StringType(), True, {'a': None})])
+ rdd = self.sc.parallelize([["a", "b"], ["c", "d"]])
+ self.sqlCtx.createDataFrame(rdd, schema)
+
def test_save_and_load(self):
df = self.df
tmpPath = tempfile.mkdtemp()