wypoon commented on a change in pull request #296: URL: https://github.com/apache/incubator-livy/pull/296#discussion_r446455553
########## File path: thriftserver/session/src/main/java/org/apache/livy/thriftserver/session/ResultSet.java ########## @@ -88,7 +88,7 @@ private String toHiveString(Object value, boolean quoteStrings) { } else if (quoteStrings && value instanceof String) { return "\"" + value + "\""; } else if (value instanceof BigDecimal) { - return ((BigDecimal) value).stripTrailingZeros().toString(); + return ((BigDecimal) value).toString(); Review comment: The fact is that Spark SQL does not actually support a decimal type with negative scale, and for good reason, the SQL standard itself states that scale is a non-negative integer. https://issues.apache.org/jira/browse/SPARK-30252 fixes org.apache.spark.sql.types.DecimalType to disallow negative scale. The reason given is the SQL standard. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org