You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Hyukjin Kwon (Jira)" <ji...@apache.org> on 2021/03/15 01:07:00 UTC

[jira] [Resolved] (SPARK-34737) Discrepancy between TIMESTAMP_SECONDS and cast from float

     [ https://issues.apache.org/jira/browse/SPARK-34737?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hyukjin Kwon resolved SPARK-34737.
----------------------------------
    Fix Version/s: 3.2.0
       Resolution: Fixed

Issue resolved by pull request 31831
[https://github.com/apache/spark/pull/31831]

> Discrepancy between TIMESTAMP_SECONDS and cast from float
> ---------------------------------------------------------
>
>                 Key: SPARK-34737
>                 URL: https://issues.apache.org/jira/browse/SPARK-34737
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 3.2.0
>            Reporter: Max Gekk
>            Assignee: Max Gekk
>            Priority: Major
>             Fix For: 3.2.0
>
>
> TIMESTAMP_SECONDS and CAST(<float> AS TIMESTAMP) have different results:
> {code:sql}
> spark-sql> SELECT CAST(16777215.0f AS TIMESTAMP);
> 1970-07-14 07:20:15
> spark-sql> SELECT TIMESTAMP_SECONDS(16777215.0f);
> 1970-07-14 07:20:14.951424
> {code}



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

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