(fix)(headless) fix db parse error (#1477) (#1492)

This commit is contained in:
jipeli
2024-07-30 20:34:27 +08:00
committed by GitHub
parent b5fa54a754
commit 12a504585f

View File

@@ -67,8 +67,8 @@ public class DataSourceNode extends SemanticNode {
String tb = entry.getKey();
String db = "";
if (entry.getKey().indexOf(".") > 0) {
db = entry.getKey().substring(0, entry.getKey().indexOf("."));
tb = entry.getKey().substring(entry.getKey().indexOf(".") + 1);
db = entry.getKey().substring(0, entry.getKey().lastIndexOf("."));
tb = entry.getKey().substring(entry.getKey().lastIndexOf(".") + 1);
}
addSchemaTable(scope, datasource, db, tb, entry.getValue());
}