You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@livy.apache.org by "Wing Yew Poon (Jira)" <ji...@apache.org> on 2020/05/20 18:59:00 UTC

[jira] [Commented] (LIVY-771) Thrift server returns decimal value with trailing zeros removed

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

Wing Yew Poon commented on LIVY-771:
------------------------------------

I'll create a PR with a fix.

> Thrift server returns decimal value with trailing zeros removed
> ---------------------------------------------------------------
>
>                 Key: LIVY-771
>                 URL: https://issues.apache.org/jira/browse/LIVY-771
>             Project: Livy
>          Issue Type: Bug
>          Components: Thriftserver
>    Affects Versions: 0.6.0, 0.7.0
>            Reporter: Wing Yew Poon
>            Priority: Major
>
> I have been doing some Hive interop testing. I have a Hive table with a column, f_decimal decimal(5, 2). 
> I run a query to select f_decimal from the table. I run this in Hive (HS2) through beeline, as well as in the Livy Thrift server through beeline. In the case of Hive, the decimal values are shown with the correct scale (2 places to the right of the decimal point) in all cases, while in the case of the Livy TS, the decimal values that have trailing zeros are shown with trailing zeros removed. E.g., 9.40 in Hive vs 9.4 in Livy; 713.00 in Hive vs 713 in Livy. (I did not actually have this in my table, but 120.00 in Hive would be 1.2E+2 in Livy.)
> I would argue that this is incorrect behavior (a bug). If the column type is decimal(5, 2), then the values should be shown with the correct scale. Also, the results should, where possible, be the same in Livy as in Hive.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)