Skip to content

Commit 9ec07e4

Browse files
set Double values to structured record for NUMERIC type when oracle return a double value (#187)
1 parent 58d460a commit 9ec07e4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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.setDecimal(field.getName(), BigDecimal.valueOf(resultSet.getDouble(columnIndex)));
215+
recordBuilder.set(field.getName(), resultSet.getDouble(columnIndex));
216216
} else {
217217
// For a Number type without specified precision and scale, precision will be 0 and scale will be -127
218218
if (precision == 0) {

0 commit comments

Comments
 (0)