[
https://issues.apache.org/jira/browse/CALCITE-796?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14624044#comment-14624044
]
Julian Hyde commented on CALCITE-796:
-------------------------------------
Similar remarks to CALCITE-795 on type system. I think we should know what the
type of the column or parameter is before transmitting. If it is a
timestamp(3), (i.e. only down to millseconds), don't transmit the nanos. If is
it timestamp(9) (or precision between 4 and 9) then transmit the nanos.
> 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 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)