You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@livy.apache.org by "Marco Gaido (Jira)" <ji...@apache.org> on 2019/11/12 10:29:00 UTC
[jira] [Resolved] (LIVY-699) [LIVY-699][THRIFT] Fix
resultSet.getBigDecimal throw java.sql.SQLException: Illegal conversion
[ https://issues.apache.org/jira/browse/LIVY-699?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Marco Gaido resolved LIVY-699.
------------------------------
Fix Version/s: 0.7.0
Assignee: runzhiwang
Resolution: Fixed
Issue resolved by PR https://github.com/apache/incubator-livy/pull/247.
> [LIVY-699][THRIFT] Fix resultSet.getBigDecimal throw java.sql.SQLException: Illegal conversion
> ----------------------------------------------------------------------------------------------
>
> Key: LIVY-699
> URL: https://issues.apache.org/jira/browse/LIVY-699
> Project: Livy
> Issue Type: Bug
> Affects Versions: 0.6.0
> Reporter: runzhiwang
> Assignee: runzhiwang
> Priority: Major
> Fix For: 0.7.0
>
> Time Spent: 40m
> Remaining Estimate: 0h
>
> 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.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)