phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin Liew (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PHOENIX-2324) Decimal data sent by Avatica cannot be interpreted by some clients
Date Mon, 16 Nov 2015 20:43:11 GMT

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

Kevin Liew commented on PHOENIX-2324:
-------------------------------------

Thanks James, Josh. I have opened a new ticket at CALCITE-972

> Decimal data sent by Avatica cannot be interpreted by some clients
> ------------------------------------------------------------------
>
>                 Key: PHOENIX-2324
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-2324
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 4.5.2
>            Reporter: Kevin Liew
>              Labels: avatica, calcite, decimal, double, json, number, phoenix, queryserver,
wireprotocol
>
> JSON specifies a 'number' data type which does not differentiate between integer and
floating-point values. The encoding for JSON numbers is implementation-specific. Libraries
such as RapidJSON can treat all non-integer values as 'double' while still being compliant
with JSON specifications. As a result, decimal values sent by Phoenix  will lose precision
on the client side. 
> Decimal data should be sent as a string. If it is sent as a number, we cannot be expect
that all JSON-spec compliant library will handle it properly. 
> ie. Phoenix sends a decimal as a JSON number, but Rapidjson can only  extract JSON numbers
as integer or double because the C++ language does not have native decimal support. 



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

Mime
View raw message