[polish] remove redundant Geometry type checking code

This commit is contained in:
gongzhongqiang 2023-12-07 22:47:01 +08:00 committed by Jiri Pechanec
parent 5130ba7bc5
commit 018ecfe9f6

View File

@ -670,12 +670,8 @@ protected Object convertGeometry(Column column, Field fieldDefn, Object data) {
if (data instanceof byte[]) {
// The binlog utility sends a byte array for any Geometry type, we will use our own binaryParse to parse the byte to WKB, hence
// to the suitable class
if (data instanceof byte[]) {
// The binlog utility sends a byte array for any Geometry type, we will use our own binaryParse to parse the byte to WKB, hence
// to the suitable class
MySqlGeometry mySqlGeometry = MySqlGeometry.fromBytes((byte[]) data);
r.deliver(io.debezium.data.geometry.Geometry.createValue(fieldDefn.schema(), mySqlGeometry.getWkb(), mySqlGeometry.getSrid()));
}
MySqlGeometry mySqlGeometry = MySqlGeometry.fromBytes((byte[]) data);
r.deliver(io.debezium.data.geometry.Geometry.createValue(fieldDefn.schema(), mySqlGeometry.getWkb(), mySqlGeometry.getSrid()));
}
});
}