spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sean Owen (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SPARK-22157) The uniux_timestamp method handles the time field that is lost in mill
Date Thu, 28 Sep 2017 12:37:00 GMT

    [ https://issues.apache.org/jira/browse/SPARK-22157?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16184088#comment-16184088
] 

Sean Owen commented on SPARK-22157:
-----------------------------------

This is invalid. A UNIX timestamp is in whole seconds.

> The uniux_timestamp method handles the time field that is lost in mill
> ----------------------------------------------------------------------
>
>                 Key: SPARK-22157
>                 URL: https://issues.apache.org/jira/browse/SPARK-22157
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 2.0.2, 2.1.0, 2.2.0
>            Reporter: hantiantian
>
> 1、create table test,and execute the flowing command
> select s1 from test;
> result:  2014-10-10 19:30:10.222
> 2、when use the native unix_timestamp method, and execute the flowing command
> select unix_timestamp(s1,"yyyy-MM-dd HH:mm:ss.SSS") from test;
> result:  1412940610
> Obviously,the mill part of the time field has been lost.
> 3、After repair,execute the command again
> select unix_timestamp(s1,"yyyy-MM-dd HH:mm:ss.SSS") from test;
> result:  1412940610.222
> Conclusion:After repair, we can keep the the mill part of the time field.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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


Mime
View raw message