Skip to content

Commit

Permalink
Revert "refactor by DBZ-3700"
Browse files Browse the repository at this point in the history
This reverts commit 7f79cb9.
  • Loading branch information
ruanhang1993 committed Jun 15, 2022
1 parent 7f79cb9 commit d87af39
Showing 1 changed file with 4 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -310,22 +310,10 @@ else if (actualColumn.jdbcType() == Types.TINYINT
// DBZ-2673
// It is necessary to check the type names as types like ENUM and SET are
// also reported as JDBC type char
else if (connectorConfig
.customConverterRegistry()
.getValueConverter(actualTable.id(), actualColumn)
.isPresent()
&& ("CHAR".equals(actualColumn.typeName())
|| "VARCHAR".equals(actualColumn.typeName())
|| "TEXT".equals(actualColumn.typeName()))) {
try {
return rs.getString(fieldNo).getBytes(actualColumn.charsetName());
} catch (UnsupportedEncodingException e) {
LOG.warn(
"Unsupported encoding '{}' for column '{}', sending value as String",
actualColumn.charsetName(),
actualColumn.name());
return rs.getObject(fieldNo);
}
else if ("CHAR".equals(actualColumn.typeName())
|| "VARCHAR".equals(actualColumn.typeName())
|| "TEXT".equals(actualColumn.typeName())) {
return rs.getString(fieldNo);
} else {
return rs.getObject(fieldNo);
}
Expand Down

0 comments on commit d87af39

Please sign in to comment.