summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpshi2011-12-15 00:18:26 (EST)
committer xgu2012-01-30 02:00:37 (EST)
commit288674f9a16896f499f1ad2b6eab3747e63b0945 (patch)
tree082c04ae9488fc4b52ddeca07cea7f4419dbe346
parent5e226e18e2b97ada684753f5deb87bada8eb2df8 (diff)
downloadorg.eclipse.birt-288674f9a16896f499f1ad2b6eab3747e63b0945.zip
org.eclipse.birt-288674f9a16896f499f1ad2b6eab3747e63b0945.tar.gz
org.eclipse.birt-288674f9a16896f499f1ad2b6eab3747e63b0945.tar.bz2
fix ted 46040. Hive Data Access gives JDBCException.
-rw-r--r--data/org.eclipse.birt.report.data.oda.jdbc/src/org/eclipse/birt/report/data/oda/jdbc/ResultSet.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/data/org.eclipse.birt.report.data.oda.jdbc/src/org/eclipse/birt/report/data/oda/jdbc/ResultSet.java b/data/org.eclipse.birt.report.data.oda.jdbc/src/org/eclipse/birt/report/data/oda/jdbc/ResultSet.java
index 6c44677..2898db7 100644
--- a/data/org.eclipse.birt.report.data.oda.jdbc/src/org/eclipse/birt/report/data/oda/jdbc/ResultSet.java
+++ b/data/org.eclipse.birt.report.data.oda.jdbc/src/org/eclipse/birt/report/data/oda/jdbc/ResultSet.java
@@ -370,6 +370,11 @@ public class ResultSet implements IResultSet
Object value = rs.getObject( index );
if ( value instanceof BigDecimal )
return (BigDecimal) value;
+ // fix ted 46040, hive does not support decimal
+ if ( value instanceof Long )
+ {
+ return new BigDecimal( (Long) value );
+ }
}
catch ( SQLException e1 )
{
@@ -399,6 +404,11 @@ public class ResultSet implements IResultSet
Object value = rs.getObject( columnName );
if ( value instanceof BigDecimal )
return (BigDecimal) value;
+ // fix ted 46040, hive does not support decimal
+ if ( value instanceof Long )
+ {
+ return new BigDecimal( (Long) value );
+ }
}
catch ( SQLException e1 )
{