Source:
private static Schema getSchema(String typeName, int sqlType, int precision, int scale, String columnName, boolean handleAsDecimal) throws SQLException { Schema.Type type = Schema.Type.STRING; switch (sqlType) { case Types.NULL: type = Schema.Type.NULL; break; case Types.ROWID: break; case Types.BOOLEAN: case Types.BIT: type = Schema.Type.BOOLEAN; break; case Types.TINYINT: case Types.SMALLINT: type = Schema.Type.INT; break; case Types.INTEGER: type = "int unsigned".equalsIgnoreCase(typeName) ? Schema.Type.LONG : Schema.Type.INT; break; case Types.BIGINT: type = Schema.Type.LONG; break; case Types.REAL: case Types.FLOAT: type = Schema.Type.FLOAT; break; case Types.NUMERIC: type = scale != 0 ? Schema.Type.DOUBLE : precision > 9 ? Schema.Type.LONG : Schema.Type.INT; break; case Types.DECIMAL: if (handleAsDecimal) { return Schema.decimalOf(precision, scale); } else { type = scale != 0 ? Schema.Type.DOUBLE : precision > 9 ? Schema.Type.LONG : Schema.Type.INT; break; } case Types.DOUBLE: type = Schema.Type.DOUBLE; break; case Types.DATE: return Schema.of(Schema.LogicalType.DATE); case Types.TIME: return Schema.of(Schema.LogicalType.TIME_MICROS); case Types.TIMESTAMP: return Schema.of(Schema.LogicalType.TIMESTAMP_MICROS); case Types.BINARY: case Types.VARBINARY: case Types.LONGVARBINARY: case Types.BLOB: type = Schema.Type.BYTES; break; case Types.ARRAY: case Types.DATALINK: case Types.DISTINCT: case Types.JAVA_OBJECT: case Types.OTHER: case Types.REF: case Types.SQLXML: case Types.STRUCT: throw new SQLException(new UnsupportedTypeException(String.format("Column %s has unsupported SQL type of %s." , columnName, sqlType))); } return Schema.of(type); }

Target:
private static Schema getSchema(String typeName, int sqlType, int precision, int scale, String columnName, boolean handleAsDecimal) throws SQLException { Schema.Type type = Schema.Type.STRING; switch (sqlType) { case Types.NULL: type = Schema.Type.NULL; break; case Types.ROWID: break; case Types.BOOLEAN: case Types.BIT: type = Schema.Type.BOOLEAN; break; case Types.TINYINT: case Types.SMALLINT: type = Schema.Type.INT; break; case Types.INTEGER: type = "int unsigned".equalsIgnoreCase(typeName) ? Schema.Type.LONG : Schema.Type.INT; break; case Types.BIGINT: type = Schema.Type.LONG; break; case Types.REAL: case Types.FLOAT: type = Schema.Type.FLOAT; break; case Types.NUMERIC: case Types.DECIMAL: if (handleAsDecimal) { return Schema.decimalOf(precision, scale); } else { type = scale != 0 ? Schema.Type.DOUBLE : precision > 9 ? Schema.Type.LONG : Schema.Type.INT; break; } case Types.DOUBLE: type = Schema.Type.DOUBLE; break; case Types.DATE: return Schema.of(Schema.LogicalType.DATE); case Types.TIME: return Schema.of(Schema.LogicalType.TIME_MICROS); case Types.TIMESTAMP: return Schema.of(Schema.LogicalType.TIMESTAMP_MICROS); case Types.BINARY: case Types.VARBINARY: case Types.LONGVARBINARY: case Types.BLOB: type = Schema.Type.BYTES; break; case Types.ARRAY: case Types.DATALINK: case Types.DISTINCT: case Types.JAVA_OBJECT: case Types.OTHER: case Types.REF: case Types.SQLXML: case Types.STRUCT: throw new SQLException(new UnsupportedTypeException(String.format("Column %s has unsupported SQL type of %s." , columnName, sqlType))); } return Schema.of(type); }