Skip to content

Commit

Permalink
Merge pull request #23 from Altinity/15-mysql-bigint-to-ch-int64-does…
Browse files Browse the repository at this point in the history
…nt-work-correct-with-autocreatetables-true-setting

Map INT32 Kafka connect to INT256 CH type
  • Loading branch information
subkanthi committed Jul 31, 2022
2 parents b136c6a + 5485a4e commit 05f6986
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ public class ClickHouseDataTypeMapper {
dataTypesMap.put(new MutablePair(Schema.INT16_SCHEMA.type(), null), ClickHouseDataType.Int16);
dataTypesMap.put(new MutablePair(Schema.INT8_SCHEMA.type(), null), ClickHouseDataType.Int8);
dataTypesMap.put(new MutablePair(Schema.INT32_SCHEMA.type(), null), ClickHouseDataType.Int32);
dataTypesMap.put(new MutablePair(Schema.INT64_SCHEMA.type(), null), ClickHouseDataType.Int64);

dataTypesMap.put(new MutablePair(Schema.INT64_SCHEMA.type(), null), ClickHouseDataType.Int256);

// Float
dataTypesMap.put(new MutablePair(Schema.FLOAT32_SCHEMA.type(), null), ClickHouseDataType.Float32);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ public void getClickHouseDataType() {
chDataType = ClickHouseDataTypeMapper.getClickHouseDataType(Schema.INT32_SCHEMA.type(), Date.SCHEMA_NAME);
Assert.assertTrue(chDataType.name().equalsIgnoreCase("Date32"));

chDataType = ClickHouseDataTypeMapper.getClickHouseDataType(Schema.INT64_SCHEMA.type(), null);
Assert.assertTrue(chDataType.name().equalsIgnoreCase("INT256"));


}
}

0 comments on commit 05f6986

Please sign in to comment.