Added fix to support Oracle Binary float and Binary double conversion to Avro type
Fixed CheckStyle errors
This closes
@@ -345,7 +345,10 @@ public class JdbcCommon {
byte[] bytes = rs.getBytes(i);
ByteBuffer bb = ByteBuffer.wrap(bytes);
rec.put(i - 1, bb);
-
+ } else if (javaSqlType == 100) { // Handle Oracle BINARY_FLOAT data type
+ rec.put(i - 1, rs.getFloat(i));
+ } else if (javaSqlType == 101) { // Handle Oracle BINARY_DOUBLE data type
+ rec.put(i - 1, rs.getDouble(i));
} else if (value instanceof Byte) {
// tinyint(1) type is returned by JDBC driver as java.sql.Types.TINYINT
// But value is returned by JDBC as java.lang.Byte
@@ -553,10 +556,12 @@ public class JdbcCommon {
case FLOAT:
case REAL:
+ case 100: //Oracle BINARY_FLOAT type
builder.name(columnName).type().unionOf().nullBuilder().endNull().and().floatType().endUnion().noDefault();
break;
case DOUBLE:
+ case 101: //Oracle BINARY_DOUBLE type
builder.name(columnName).type().unionOf().nullBuilder().endNull().and().doubleType().endUnion().noDefault();
break;
