Wing Yew Poon created LIVY-771:
----------------------------------

             Summary: 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.7.0, 0.6.0
            Reporter: Wing Yew Poon


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)

Reply via email to