Skip to content

Commit

Permalink
0001844: Make picking conflict detection strategy case independent wh…
Browse files Browse the repository at this point in the history
…en matching tables
  • Loading branch information
chenson42 committed Jul 29, 2014
1 parent 2e9aa0f commit cf728f8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Expand Up @@ -124,7 +124,7 @@ protected DatabaseWriterSettings buildDatabaseWriterSettings(
for (Conflict conflictSetting : conflictSettings) {
String qualifiedTableName = conflictSetting.toQualifiedTableName();
if (StringUtils.isNotBlank(qualifiedTableName)) {
byTable.put(qualifiedTableName, conflictSetting); // ADB
byTable.put(qualifiedTableName, conflictSetting);
} else if (StringUtils.isNotBlank(conflictSetting.getTargetChannelId())) {
byChannel.put(conflictSetting.getTargetChannelId(), conflictSetting);
} else {
Expand Down
Expand Up @@ -64,7 +64,7 @@ public enum DetectExpressionKey {
public String toQualifiedTableName() {
if (StringUtils.isNotBlank(targetTableName)) {
return Table.getFullyQualifiedTableName(targetCatalogName, targetSchemaName,
targetTableName);
targetTableName).toLowerCase();
} else {
return null;
}
Expand Down
Expand Up @@ -206,12 +206,12 @@ public void addErrorHandler(IDatabaseWriterErrorHandler handler) {

public Conflict pickConflict(Table table, Batch batch) {
Conflict settings = null;
String fullyQualifiedName = table.getFullyQualifiedTableName();
String fullyQualifiedName = table.getFullyQualifiedTableName().toLowerCase();
if (conflictSettingsByTable != null) {
Conflict found = conflictSettingsByTable.get(fullyQualifiedName);

if (found == null) {
found = conflictSettingsByTable.get(table.getName());
found = conflictSettingsByTable.get(table.getName().toLowerCase());
}

if (found != null
Expand Down

0 comments on commit cf728f8

Please sign in to comment.