Skip to content

Commit

Permalink
Fix the issue where the table name contains a dash line, causing the …
Browse files Browse the repository at this point in the history
…entire database synchronization to fail to execute

Signed-off-by: Zzm0809 <934230207@qq.com>
  • Loading branch information
Zzm0809 committed Sep 25, 2024
1 parent 037b01b commit 94619a2
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -279,15 +279,14 @@ public int partition(String key, int numPartitions) {
}

protected void executeCatalogStatement(CustomTableEnvironment customTableEnvironment) {}
;

/**
* replace view name middle to under line for flink use view name
* @param viewName view name
* @return view name
*/
public static String replaceViewNameMiddleLineToUnderLine(String viewName) {
if (!viewName.isEmpty() & viewName.contains("-")) {
if (!viewName.isEmpty() && viewName.contains("-")) {
logger.warn("the view name [{}] contains '-', replace '-' to '_' for flink use view name", viewName);
return viewName.replaceAll("-", "_");
}
Expand Down

0 comments on commit 94619a2

Please sign in to comment.