diff options
author | Davies Liu <davies@databricks.com> | 2015-05-31 19:55:57 -0700 |
---|---|---|
committer | Reynold Xin <rxin@databricks.com> | 2015-05-31 19:55:57 -0700 |
commit | 91777a1c3ad3b3ec7b65d5a0413209a9baf6b36a (patch) | |
tree | dbebdc7c71fbd455c9b20bf71e3f92f90b97ad59 /python/pyspark/sql/tests.py | |
parent | 6f006b5f5fca649ac51745212d8fd44b1609b9ae (diff) | |
download | spark-91777a1c3ad3b3ec7b65d5a0413209a9baf6b36a.tar.gz spark-91777a1c3ad3b3ec7b65d5a0413209a9baf6b36a.tar.bz2 spark-91777a1c3ad3b3ec7b65d5a0413209a9baf6b36a.zip |
[SPARK-7978] [SQL] [PYSPARK] DecimalType should not be singleton
Author: Davies Liu <davies@databricks.com>
Closes #6532 from davies/decimal and squashes the following commits:
c7fcbce [Davies Liu] Update tests.py
1425359 [Davies Liu] DecimalType should not be singleton
Diffstat (limited to 'python/pyspark/sql/tests.py')
-rw-r--r-- | python/pyspark/sql/tests.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/python/pyspark/sql/tests.py b/python/pyspark/sql/tests.py index 5c53c3a8ed..76384d31f1 100644 --- a/python/pyspark/sql/tests.py +++ b/python/pyspark/sql/tests.py @@ -100,6 +100,15 @@ class DataTypeTests(unittest.TestCase): lt2 = pickle.loads(pickle.dumps(LongType())) self.assertEquals(lt, lt2) + # regression test for SPARK-7978 + def test_decimal_type(self): + t1 = DecimalType() + t2 = DecimalType(10, 2) + self.assertTrue(t2 is not t1) + self.assertNotEqual(t1, t2) + t3 = DecimalType(8) + self.assertNotEqual(t2, t3) + class SQLTests(ReusedPySparkTestCase): |