Maxim Gekk created SPARK-30843:
----------------------------------

             Summary: Wrong results of getting time components before 1582 year
                 Key: SPARK-30843
                 URL: https://issues.apache.org/jira/browse/SPARK-30843
             Project: Spark
          Issue Type: Bug
          Components: SQL
    Affects Versions: 3.0.0
            Reporter: Maxim Gekk


Here are example that show the issues:
{code:sql}
spark-sql> select hour(timestamp '0010-01-01 00:00:00');
23
spark-sql> select minute(timestamp '0010-01-01 00:00:00');
52
spark-sql> select second(timestamp '0010-01-01 00:00:00');
58
spark-sql> select date_part('milliseconds', timestamp '0010-01-01 00:00:00');
58000.000
spark-sql> select date_part('microseconds', timestamp '0010-01-01 00:00:00');
58000000
{code}
The expected results must be:
* hour = 0
* minute = 0
* second = 0
* milliseconds = 0
* microseconds = 0



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to