azexcy commented on code in PR #19361:
URL: https://github.com/apache/shardingsphere/pull/19361#discussion_r925334268
##########
shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-core/src/main/java/org/apache/shardingsphere/data/pipeline/core/metadata/generator/PipelineDDLGenerator.java:
##########
@@ -225,6 +225,10 @@ private Optional<String> decorateOpenGauss(final
DatabaseType databaseType, fina
if (logicSQL.toLowerCase().startsWith(SET_SEARCH_PATH_PREFIX)) {
return Optional.empty();
}
- return Optional.of(replaceTableNameWithPrefix(logicSQL, schemaName +
".", databaseType, databaseName));
+ String result = replaceTableNameWithPrefix(logicSQL, schemaName + ".",
databaseType, databaseName);
+ if (result.toUpperCase().startsWith("CREATE TABLE")) {
+ result = result.replaceFirst("CREATE TABLE", "CREATE TABLE IF NOT
EXISTS");
+ }
+ return Optional.of(result);
Review Comment:
Only use for openGauss
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]