You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Lukas Lalinsky (JIRA)" <ji...@apache.org> on 2015/07/13 00:17:04 UTC

[jira] [Updated] (CALCITE-796) Avatica remote service truncates java.sql.Timestamp truncates to milliseconds

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

Lukas Lalinsky updated CALCITE-796:
-----------------------------------
    Description: 
TypedValue in Avatica read/writes java.sql.Timestamp in milliseconds even though natively the type supports nanosecond precision (and Phoenix does use the full precision). The JSON serialization protocol should count with this.

I'd suggest serializing java.sql.Timestamp with `toString()` and deserializing with `valueOf()` if it's a string. Alternatively, it could be stored as a decimal number or just total number of nanoseconds.

  was:
TypedValue in Avatica read/writes java.sql.Timestamp even though natively the type supports nanosecond precision (and Phoenix does use the full precision). The JSON serialization protocol should count with this.

I'd suggest serializing java.sql.Timestamp with `toString()` and deserializing with `valueOf()` if it's a string. Alternatively, it could be stored as a decimal number or just total number of nanoseconds.


> Avatica remote service truncates java.sql.Timestamp truncates to milliseconds
> -----------------------------------------------------------------------------
>
>                 Key: CALCITE-796
>                 URL: https://issues.apache.org/jira/browse/CALCITE-796
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: Lukas Lalinsky
>            Assignee: Julian Hyde
>
> TypedValue in Avatica read/writes java.sql.Timestamp in milliseconds even though natively the type supports nanosecond precision (and Phoenix does use the full precision). The JSON serialization protocol should count with this.
> I'd suggest serializing java.sql.Timestamp with `toString()` and deserializing with `valueOf()` if it's a string. Alternatively, it could be stored as a decimal number or just total number of nanoseconds.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)