You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@phoenix.apache.org by "Istvan Toth (Jira)" <ji...@apache.org> on 2022/10/20 05:56:00 UTC

[jira] [Commented] (PHOENIX-6792) FastDateFormat cannot parse greater than milisecond precision.

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

Istvan Toth commented on PHOENIX-6792:
--------------------------------------

Neither can Joda.

Only java.time is fully nanosecond capable.

> FastDateFormat cannot parse greater than milisecond precision.
> --------------------------------------------------------------
>
>                 Key: PHOENIX-6792
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-6792
>             Project: Phoenix
>          Issue Type: Bug
>          Components: core
>            Reporter: Istvan Toth
>            Priority: Major
>
> While working on PHOENIX-5066, I found that FastDateFormat is incapable of handling greater than milisecond precision.
> We're using the format string: "yyyy-MM-dd HH:mm:ss.SSS", but we want to parse nanosecond resolution timestamp strings like "2020-01-01 13:30:00.123456789"
> Strictly speaking FastDateFormat works as documented, as it interprets 123456789 as miliseconds, and sets miliseconds to "789", and adds "123456" seconds to the date.
> However, this is clearly not the intended behaviour.
> We either need to add some format-dependent heuristics, or drop FastDateFormat usage.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)