summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpshi2011-12-15 00:18:26 (EST)
committer mwu2011-12-15 00:18:26 (EST)
commitb30fb38e3ef8c31e654da35a953af08cf448f19e (patch)
tree1f4478c165e82e12ba9431d0359dcf759f8587fe
parenta9f3da3aad62af0cde25fbb0a9e9b7c17c879376 (diff)
downloadorg.eclipse.birt-b30fb38e3ef8c31e654da35a953af08cf448f19e.zip
org.eclipse.birt-b30fb38e3ef8c31e654da35a953af08cf448f19e.tar.gz
org.eclipse.birt-b30fb38e3ef8c31e654da35a953af08cf448f19e.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 )
{