Skip to content
This repository has been archived by the owner on Sep 13, 2024. It is now read-only.

Commit

Permalink
DBZ-6637 Fix case concern with Db2
Browse files Browse the repository at this point in the history
  • Loading branch information
Naros committed Jul 26, 2023
1 parent 96e8302 commit 6396720
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -153,4 +153,18 @@ public String getFormattedTimestampWithTimeZone(String value) {
return String.format("'%s'", DateTimeFormatter.ISO_LOCAL_DATE_TIME.format(zonedDateTime));
}

@Override
protected String resolveColumnNameFromField(String fieldName) {
String columnName = super.resolveColumnNameFromField(fieldName);
if (!getConfig().isQuoteIdentifiers()) {
// There are specific use cases where we explicitly quote the column name, even if the
// quoted identifiers is not enabled, such as the Kafka primary key mode column names.
// If they're quoted, we shouldn't uppercase the column name.
if (!getIdentifierHelper().toIdentifier(columnName).isQuoted()) {
// Db2 defaults to uppercase for identifiers
columnName = columnName.toUpperCase();
}
}
return columnName;
}
}

0 comments on commit 6396720

Please sign in to comment.