Skip to content

Commit

Permalink
Update test.
Browse files Browse the repository at this point in the history
  • Loading branch information
Davin Chia authored and Davin Chia committed Mar 24, 2021
1 parent f6273bb commit 794796c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class DataTypeEnumTest {
@Test
void testConversionFromJsonSchemaPrimitiveToDataType() {
assertEquals(5, DataType.class.getEnumConstants().length);
assertEquals(6, JsonSchemaPrimitive.class.getEnumConstants().length);
assertEquals(7, JsonSchemaPrimitive.class.getEnumConstants().length);

assertEquals(DataType.STRING, DataType.fromValue(JsonSchemaPrimitive.STRING.toString().toLowerCase()));
assertEquals(DataType.NUMBER, DataType.fromValue(JsonSchemaPrimitive.NUMBER.toString().toLowerCase()));
Expand Down
3 changes: 2 additions & 1 deletion airbyte-db/src/main/java/io/airbyte/db/jdbc/JdbcUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,8 @@ public static JsonSchemaPrimitive getType(JDBCType jdbcType) {
case TIME -> JsonSchemaPrimitive.STRING;
case TIMESTAMP -> JsonSchemaPrimitive.STRING;
case BINARY, VARBINARY, LONGVARBINARY -> JsonSchemaPrimitive.STRING;
// since data column types aren't necessarily meaningful to Airbyte, liberally convert all unrecognized
// since data column types aren't necessarily meaningful to Airbyte, liberally convert all
// unrecognized
// types to String
default -> JsonSchemaPrimitive.STRING;
};
Expand Down

0 comments on commit 794796c

Please sign in to comment.