Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
0.6.0
-
None
-
None
Description
LIVY-699[THRIFT] Fix resultSet.getBigDecimal throw java.sql.SQLException: Illegal conversion.
Follows are steps to reproduce the problem:
- create table test(id decimal).
- Then resultSet.getBigDecimal(1) will throw: java.sql.SQLException: Illegal conversion. The reason is getSchema().getColumnDescriptorAt(columnIndex - 1).getType(); at https://github.com/apache/hive/blob/master/jdbc/src/java/org/apache/hive/jdbc/HiveBaseResultSet.java#L415 return string, so cannot pass the check val instanceof BigDecimal at https://github.com/apache/hive/blob/master/jdbc/src/java/org/apache/hive/jdbc/HiveBaseResultSet.java#L133, so throw java.sql.SQLException: Illegal conversion at https://github.com/apache/hive/blob/master/jdbc/src/java/org/apache/hive/jdbc/HiveBaseResultSet.java#L137
Additionally, SparkThrift return decimal instead of string in the same case, so it is necessary to return decimal instead of string in livy. The same to timestamp and date.
Attachments
Issue Links
- links to