spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dongjoon-hyun <...@git.apache.org>
Subject [GitHub] spark pull request #16896: [SPARK-19561][Python] cast TimestampType.toIntern...
Date Sun, 12 Feb 2017 01:16:15 GMT
Github user dongjoon-hyun commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16896#discussion_r100680863
  
    --- Diff: python/pyspark/sql/tests.py ---
    @@ -1435,6 +1435,12 @@ def test_time_with_timezone(self):
             self.assertEqual(now, now1)
             self.assertEqual(now, utcnow1)
     
    +    # regression test for SPARK-19561
    +    def test_datetime_at_epoch(self):
    +        epoch = datetime.datetime.fromtimestamp(0)
    +        df = self.spark.createDataFrame([Row(date=epoch)])
    +        self.assertEqual(df.first()['date'], epoch)
    --- End diff --
    
    Can we make a test case in `class DataTypeTests(unittest.TestCase)` instead?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Mime
View raw message