Skip to content

Commit

Permalink
[Fix-340][Engine] Local engine, mysql supports fields whose names are…
Browse files Browse the repository at this point in the history
… mysql keywords
  • Loading branch information
xxzuo committed Jan 23, 2024
1 parent bcc5b1c commit 3e83118
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,9 @@ public boolean invalidateItemCanOutputToSelf() {
public boolean supportToBeErrorDataStorage() {
return true;
}

@Override
public String quoteIdentifier(String entity) {
return "`" + entity + "`";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ protected List<SourceConfig> getSourceConfigs() throws DataVinesException {
metricInputParameter.put(SRC_CONNECTOR_TYPE, connectorParameter.getType());
metricInputParameter.put(TABLE, table);

metricInputParameter.put(COLUMN, connectorFactory.getDialect().quoteIdentifier(metricInputParameter.get(COLUMN)));

boolean invalidateItemCanOutput = Boolean.parseBoolean(metricInputParameter.get(INVALIDATE_ITEM_CAN_OUTPUT));
invalidateItemCanOutput &= connectorFactory.getDialect().invalidateItemCanOutput();
metricInputParameter.put(INVALIDATE_ITEM_CAN_OUTPUT, String.valueOf(invalidateItemCanOutput));
Expand Down

0 comments on commit 3e83118

Please sign in to comment.