Skip to content

Commit 9321bbc

Browse files
authored
Merge pull request #8 from sap-contributions/MXP-2662
MXP-2662 Remove caching lookup to prevent further issues with inconsistencies
2 parents 06a107d + 1872268 commit 9321bbc

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

core/src/main/java/org/apache/calcite/adapter/jdbc/JdbcSchema.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
import org.apache.calcite.rel.type.RelDataTypeSystem;
2828
import org.apache.calcite.rel.type.RelProtoDataType;
2929
import org.apache.calcite.schema.*;
30-
import org.apache.calcite.schema.lookup.CachingLookup;
3130
import org.apache.calcite.schema.lookup.IgnoreCaseLookup;
3231
import org.apache.calcite.schema.lookup.LikePattern;
3332
import org.apache.calcite.schema.lookup.Lookup;
@@ -88,7 +87,7 @@ public class TableNotFoundException extends RuntimeException {
8887
final @Nullable String schema;
8988
public final SqlDialect dialect;
9089
final JdbcConvention convention;
91-
private final Lookup<Table> tables = new CachingLookup<Table>(new IgnoreCaseLookup<Table>() {
90+
private final Lookup<Table> tables = new IgnoreCaseLookup<Table>() {
9291
@Override
9392
public @Nullable Table get(String name) {
9493
try (Stream<MetaImpl.MetaTable> s = getMetaTableStream(name)) {
@@ -102,7 +101,7 @@ public Set<String> getNames(LikePattern pattern) {
102101
return s.map(it -> it.tableName).collect(Collectors.toSet());
103102
}
104103
}
105-
});
104+
};
106105
private final Lookup<JdbcSchema> subSchemas = Lookup.empty();
107106

108107
@Experimental

0 commit comments

Comments
 (0)