diff --git a/airbyte-db/db-lib/src/main/java/io/airbyte/db/bigquery/BigQuerySourceOperations.java b/airbyte-db/db-lib/src/main/java/io/airbyte/db/bigquery/BigQuerySourceOperations.java index 8581885528b2..4486e4e24728 100644 --- a/airbyte-db/db-lib/src/main/java/io/airbyte/db/bigquery/BigQuerySourceOperations.java +++ b/airbyte-db/db-lib/src/main/java/io/airbyte/db/bigquery/BigQuerySourceOperations.java @@ -119,7 +119,8 @@ public Date getDateValue(final FieldValue fieldValue, final DateFormat dateForma public JsonSchemaType getJsonType(final StandardSQLTypeName bigQueryType) { return switch (bigQueryType) { case BOOL -> JsonSchemaType.BOOLEAN; - case INT64, FLOAT64, NUMERIC, BIGNUMERIC -> JsonSchemaType.NUMBER; + case INT64 -> JsonSchemaType.NUMBER_BIGINT; + case FLOAT64, NUMERIC, BIGNUMERIC -> JsonSchemaType.NUMBER; case STRING, BYTES, TIMESTAMP, DATE, TIME, DATETIME -> JsonSchemaType.STRING; case ARRAY -> JsonSchemaType.ARRAY; case STRUCT -> JsonSchemaType.OBJECT; diff --git a/airbyte-integrations/connectors/source-mysql/src/main/java/io/airbyte/integrations/source/mysql/MySqlSourceOperations.java b/airbyte-integrations/connectors/source-mysql/src/main/java/io/airbyte/integrations/source/mysql/MySqlSourceOperations.java index 21fa26448166..99b44244d6d5 100644 --- a/airbyte-integrations/connectors/source-mysql/src/main/java/io/airbyte/integrations/source/mysql/MySqlSourceOperations.java +++ b/airbyte-integrations/connectors/source-mysql/src/main/java/io/airbyte/integrations/source/mysql/MySqlSourceOperations.java @@ -173,7 +173,9 @@ public JsonSchemaType getJsonType(MysqlType mysqlType) { case // TINYINT(1) is boolean, but it should have been converted to MysqlType.BOOLEAN in {@link // getFieldType} - TINYINT, TINYINT_UNSIGNED, SMALLINT, SMALLINT_UNSIGNED, INT, INT_UNSIGNED, MEDIUMINT, MEDIUMINT_UNSIGNED, BIGINT, BIGINT_UNSIGNED, FLOAT, FLOAT_UNSIGNED, DOUBLE, DOUBLE_UNSIGNED, DECIMAL, DECIMAL_UNSIGNED -> JsonSchemaType.NUMBER; + TINYINT, TINYINT_UNSIGNED, SMALLINT, SMALLINT_UNSIGNED, INT, INT_UNSIGNED, MEDIUMINT, MEDIUMINT_UNSIGNED -> JsonSchemaType.INTEGER; + case BIGINT, BIGINT_UNSIGNED -> JsonSchemaType.NUMBER_BIGINT; + case FLOAT, FLOAT_UNSIGNED, DOUBLE, DOUBLE_UNSIGNED, DECIMAL, DECIMAL_UNSIGNED -> JsonSchemaType.NUMBER; case BOOLEAN -> JsonSchemaType.BOOLEAN; case NULL -> JsonSchemaType.NULL; // BIT(1) is boolean, but it should have been converted to MysqlType.BOOLEAN in {@link getFieldType} diff --git a/airbyte-integrations/connectors/source-tidb/src/main/java/io/airbyte/integrations/source/tidb/TiDBSourceOperations.java b/airbyte-integrations/connectors/source-tidb/src/main/java/io/airbyte/integrations/source/tidb/TiDBSourceOperations.java index 81e85888be71..a7b3b0fcbe2c 100644 --- a/airbyte-integrations/connectors/source-tidb/src/main/java/io/airbyte/integrations/source/tidb/TiDBSourceOperations.java +++ b/airbyte-integrations/connectors/source-tidb/src/main/java/io/airbyte/integrations/source/tidb/TiDBSourceOperations.java @@ -143,7 +143,9 @@ public JsonSchemaType getJsonType(MysqlType mysqlType) { case // TINYINT(1) is boolean, but it should have been converted to MysqlType.BOOLEAN in {@link // getFieldType} - TINYINT, TINYINT_UNSIGNED, SMALLINT, SMALLINT_UNSIGNED, INT, INT_UNSIGNED, MEDIUMINT, MEDIUMINT_UNSIGNED, BIGINT, BIGINT_UNSIGNED, FLOAT, FLOAT_UNSIGNED, DOUBLE, DOUBLE_UNSIGNED, DECIMAL, DECIMAL_UNSIGNED -> JsonSchemaType.NUMBER; + TINYINT, TINYINT_UNSIGNED, SMALLINT, SMALLINT_UNSIGNED, INT, INT_UNSIGNED, MEDIUMINT, MEDIUMINT_UNSIGNED -> JsonSchemaType.INTEGER; + case BIGINT, BIGINT_UNSIGNED -> JsonSchemaType.NUMBER_BIGINT; + case FLOAT, FLOAT_UNSIGNED, DOUBLE, DOUBLE_UNSIGNED, DECIMAL, DECIMAL_UNSIGNED -> JsonSchemaType.NUMBER; case BOOLEAN -> JsonSchemaType.BOOLEAN; case NULL -> JsonSchemaType.NULL; // BIT(1) is boolean, but it should have been converted to MysqlType.BOOLEAN in {@link getFieldType}