Skip to content

Commit

Permalink
Map INT32 Kafka connect to INT256 CH type
Browse files Browse the repository at this point in the history
  • Loading branch information
subkanthi committed Jul 31, 2022
1 parent b136c6a commit 5485a4e
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 5485a4e

Please sign in to comment.