Skip to content

Commit

Permalink
Clarify the usage of Row.
Browse files Browse the repository at this point in the history
  • Loading branch information
ueshin committed Nov 13, 2017
1 parent 8b1a4d8 commit e919ed5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion python/pyspark/sql/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -3265,7 +3265,9 @@ def test_createDataFrame_respect_session_timezone(self):

self.assertNotEqual(result_ny, result_la)

result_la_corrected = [Row(*(r[0:6] + (r[6] - timedelta(hours=3),))) for r in result_la]
result_la_corrected = [Row(**{k: v - timedelta(hours=3) if k == '7_timestamp_t' else v
for k, v in row.asDict().items()})
for row in result_la]
self.assertEqual(result_ny, result_la_corrected)
finally:
self.spark.conf.set("spark.sql.session.timeZone", orig_tz)
Expand Down

0 comments on commit e919ed5

Please sign in to comment.