Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Cannot Reproduce
-
2.3.4
-
None
-
None
Description
Running below code does not return 4 values due to one timestamp not being correctly created (possible problem with daylight saving):
spark.sql("""SELECT from_unixtime(unix_timestamp('2020-03-08 01:00:00'), 'yyyyMMdd') t1, from_unixtime(unix_timestamp('2020-03-08 02:00:00'), 'yyyyMMdd') t2, from_unixtime(unix_timestamp('2020-03-08 03:00:00'), 'yyyyMMdd') t3, from_unixtime(unix_timestamp('2020-03-08 04:00:00'), 'yyyyMMdd') t4""").show +--------+----+--------+--------+ | t1| t2| t3| t4| +--------+----+--------+--------+ |20200308|null|20200308|20200308| +--------+----+--------+--------+
This unexpected NULL value caused us problems as we did not expect it.