diff options
author | animesh <animesh@apache.spark> | 2015-06-03 11:28:18 -0700 |
---|---|---|
committer | Reynold Xin <rxin@databricks.com> | 2015-06-03 11:28:18 -0700 |
commit | d053a31be93d789e3f26cf55d747ecf6ca386c29 (patch) | |
tree | d864eda0ced1151c00404197173afbf49acf0fb6 /python/pyspark/sql/tests.py | |
parent | 2c4d550eda0e6f33d2d575825c3faef4c9217067 (diff) | |
download | spark-d053a31be93d789e3f26cf55d747ecf6ca386c29.tar.gz spark-d053a31be93d789e3f26cf55d747ecf6ca386c29.tar.bz2 spark-d053a31be93d789e3f26cf55d747ecf6ca386c29.zip |
[SPARK-7980] [SQL] Support SQLContext.range(end)
1. range() overloaded in SQLContext.scala
2. range() modified in python sql context.py
3. Tests added accordingly in DataFrameSuite.scala and python sql tests.py
Author: animesh <animesh@apache.spark>
Closes #6609 from animeshbaranawal/SPARK-7980 and squashes the following commits:
935899c [animesh] SPARK-7980:python+scala changes
Diffstat (limited to 'python/pyspark/sql/tests.py')
-rw-r--r-- | python/pyspark/sql/tests.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/python/pyspark/sql/tests.py b/python/pyspark/sql/tests.py index 6e498f0af0..a6fce50c76 100644 --- a/python/pyspark/sql/tests.py +++ b/python/pyspark/sql/tests.py @@ -131,6 +131,8 @@ class SQLTests(ReusedPySparkTestCase): self.assertEqual(self.sqlCtx.range(1, 1).count(), 0) self.assertEqual(self.sqlCtx.range(1, 0, -1).count(), 1) self.assertEqual(self.sqlCtx.range(0, 1 << 40, 1 << 39).count(), 2) + self.assertEqual(self.sqlCtx.range(-2).count(), 0) + self.assertEqual(self.sqlCtx.range(3).count(), 3) def test_explode(self): from pyspark.sql.functions import explode |