Skip to content

Commit d5115ad

Browse files
authored
Merge pull request #85 from AdaptiveScale/bugfix/PLUGIN-200
Changed Decimal Type Mapping
2 parents 36a1d1c + adc9696 commit d5115ad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

oracle-plugin/src/main/java/io/cdap/plugin/oracle/OracleSourceDBRecord.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ private void handleOracleSpecificType(ResultSet resultSet, StructuredRecord.Buil
212212
// This is the only way to differentiate FLOAT/REAL columns from other numeric columns, that based on NUMBER.
213213
// Since FLOAT is a subtype of the NUMBER data type, 'getColumnType' and 'getColumnTypeName' can not be used.
214214
if (Double.class.getTypeName().equals(resultSet.getMetaData().getColumnClassName(columnIndex))) {
215-
recordBuilder.set(field.getName(), resultSet.getDouble(columnIndex));
215+
recordBuilder.setDecimal(field.getName(), BigDecimal.valueOf(resultSet.getDouble(columnIndex)));
216216
} else {
217217
// It's required to pass 'scale' parameter since in the case of Oracle, scale of 'BigDecimal' depends on the
218218
// scale of actual value. For example for value '77.12' scale will be '2' even if sql scale is '6'

0 commit comments

Comments
 (0)