Skip to content

Commit

Permalink
[MXP-2662](https://jira.tools.sap/browse/MXP-2662). Remove caching lo…
Browse files Browse the repository at this point in the history
…okup to prevent further issues with inconsistencies
  • Loading branch information
CoKueb committed Jul 25, 2024
1 parent 06a107d commit c91d408
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 113 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public JdbcCatalogSchema(DataSource dataSource, SqlDialect dialect,
this.dialect = requireNonNull(dialect, "dialect");
this.convention = requireNonNull(convention, "convention");
this.catalog = catalog;
this.subSchemas = new CachingLookup<>(new IgnoreCaseLookup<JdbcSchema>() {
this.subSchemas = new IgnoreCaseLookup<JdbcSchema>() {
@Override
public @Nullable JdbcSchema get(String name) {
try (Connection connection = dataSource.getConnection();
Expand Down Expand Up @@ -114,7 +114,7 @@ public Set<String> getNames(LikePattern pattern) {
}
return builder.build();
}
});
};
}

public static JdbcCatalogSchema create(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public class TableNotFoundException extends RuntimeException {
final @Nullable String schema;
public final SqlDialect dialect;
final JdbcConvention convention;
private final Lookup<Table> tables = new CachingLookup<Table>(new IgnoreCaseLookup<Table>() {
private final Lookup<Table> tables = new IgnoreCaseLookup<Table>() {
@Override
public @Nullable Table get(String name) {
try (Stream<MetaImpl.MetaTable> s = getMetaTableStream(name)) {
Expand All @@ -102,7 +102,7 @@ public Set<String> getNames(LikePattern pattern) {
return s.map(it -> it.tableName).collect(Collectors.toSet());
}
}
});
};
private final Lookup<JdbcSchema> subSchemas = Lookup.empty();

@Experimental
Expand Down
109 changes: 0 additions & 109 deletions core/src/main/java/org/apache/calcite/schema/lookup/CachingLookup.java

This file was deleted.

0 comments on commit c91d408

Please sign in to comment.