Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
HyukjinKwon authored May 27, 2024
1 parent c860edd commit 8a1e523
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions python/pyspark/sql/tests/test_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,16 +244,16 @@ def __init__(self):

with self.sql_conf({"spark.sql.timestampType": "TIMESTAMP_NTZ"}):
with self.sql_conf({"spark.sql.session.timeZone": "America/Sao_Paulo"}):
data = [(
datetime.datetime(1970, 1, 1, 0, 0),
Row(a=Row(a=datetime.datetime(1970, 1, 1, 0, 0))),
)]
df = self.spark.createDataFrame(data)
data = [
(
datetime.datetime(1970, 1, 1, 0, 0),
Row(a=Row(a=datetime.datetime(1970, 1, 1, 0, 0))),
)
]
self.assertEqual(list(df.schema)[0].dataType.simpleString(), "timestamp_ntz")
self.assertEqual(df.first()[0], datetime.datetime(1970, 1, 1, 0, 0))
self.assertEqual(
list(df.schema)[1].dataType.simpleString(),
"struct<a:struct<a:timestamp_ntz>>"
list(df.schema)[1].dataType.simpleString(), "struct<a:struct<a:timestamp_ntz>>"
)
self.assertEqual(df.first()[1], Row(a=Row(a=datetime.datetime(1970, 1, 1, 0, 0))))

Expand Down

0 comments on commit 8a1e523

Please sign in to comment.