Skip to content

Commit

Permalink
[BZ 369309] Incomplete Native Data Type Mappings in Hive ODA data sou…
Browse files Browse the repository at this point in the history
…rce extension
  • Loading branch information
Linda Chan committed Jan 21, 2012
1 parent 06f51f1 commit f6b08d3
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 9 deletions.
20 changes: 14 additions & 6 deletions data/org.eclipse.birt.report.data.oda.hive/plugin.xml
Expand Up @@ -53,27 +53,35 @@
defaultDisplayName="%select.dataset.name"
id="org.eclipse.birt.report.data.oda.hive.JdbcSelectDataSet">
<dataTypeMapping
nativeDataType="TINYINT"
nativeDataType="tinyint"
nativeDataTypeCode="-6"
odaScalarDataType="Integer"/>
<dataTypeMapping
nativeDataType="SMALLINT"
nativeDataType="smallint"
nativeDataTypeCode="5"
odaScalarDataType="Integer"/>
<dataTypeMapping
nativeDataType="int"
nativeDataTypeCode="4"
odaScalarDataType="Integer"/>
<dataTypeMapping
nativeDataType="BIGINT"
nativeDataType="bigint"
nativeDataTypeCode="-5"
odaScalarDataType="Decimal"/>
<dataTypeMapping
nativeDataType="float"
nativeDataTypeCode="6"
odaScalarDataType="Double"/>
<dataTypeMapping
nativeDataType="DOUBLE"
nativeDataType="double"
nativeDataTypeCode="8"
odaScalarDataType="Double"/>
<dataTypeMapping
nativeDataType="VARCHAR"
nativeDataType="string"
nativeDataTypeCode="12"
odaScalarDataType="String"/>
<dataTypeMapping
nativeDataType="BOOLEAN"
nativeDataType="boolean"
nativeDataTypeCode="16"
odaScalarDataType="Boolean"/>
<properties>
Expand Down
@@ -1,12 +1,12 @@
/*******************************************************************************
* Copyright (c) 2004, 2009 Actuate Corporation.
* Copyright (c) 2004, 2012 Actuate Corporation.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Actuate Corporation - initial API and implementation
* Actuate Corporation - initial API and implementation
*******************************************************************************/

package org.eclipse.birt.report.data.oda.jdbc;
Expand Down Expand Up @@ -370,7 +370,7 @@ public BigDecimal getBigDecimal( int index ) throws OdaException
Object value = rs.getObject( index );
if ( value instanceof BigDecimal )
return (BigDecimal) value;
// fix ted 46040, hive does not support decimal
// fix BZ 362714, Hive JDBC does not support BigDecimal
if ( value instanceof Long )
{
return new BigDecimal( (Long) value );
Expand Down

0 comments on commit f6b08d3

Please sign in to comment.