summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpshi2011-12-15 00:18:26 (EST)
committer Linda Chan2012-01-21 18:11:07 (EST)
commit06f51f1852ebc82d85defff3a2d273846aab72f0 (patch)
tree1581065ff04dc3631dbf6db2eec55d38952989df
parentc5843989ed8b90c31944d83a81b8318f7cae1082 (diff)
downloadorg.eclipse.birt-06f51f1852ebc82d85defff3a2d273846aab72f0.zip
org.eclipse.birt-06f51f1852ebc82d85defff3a2d273846aab72f0.tar.gz
org.eclipse.birt-06f51f1852ebc82d85defff3a2d273846aab72f0.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 )
{