Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev/calcite #3

Merged
merged 14 commits into from
Dec 22, 2021
Prev Previous commit
Next Next commit
Clear schema maps when data source is reloaded
  • Loading branch information
taewhi committed Dec 15, 2021
commit 13fa0b202b677efa4c1a1754064e88c4ae069623
5 changes: 5 additions & 0 deletions traindb-core/src/main/java/traindb/schema/SchemaManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,12 @@ public void loadDataSource(DataSource dataSource) {
}

public void refreshDataSource() {
writeLock.lock();
dataSourceMap.clear();
schemaMap.clear();
tableMap.clear();
loadDataSource(traindbDataSource.getDataSource());
writeLock.unlock();
}

private void addDataSourceToMaps(TrainDBDataSource traindbDataSource) {
Expand Down