Skip to content

Commit

Permalink
Merge pull request #8 from sap-contributions/MXP-2662
Browse files Browse the repository at this point in the history
MXP-2662 Remove caching lookup to prevent further issues with inconsistencies
  • Loading branch information
CoKueb authored Jul 25, 2024
2 parents 06a107d + 1872268 commit 9321bbc
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
import org.apache.calcite.rel.type.RelDataTypeSystem;
import org.apache.calcite.rel.type.RelProtoDataType;
import org.apache.calcite.schema.*;
import org.apache.calcite.schema.lookup.CachingLookup;
import org.apache.calcite.schema.lookup.IgnoreCaseLookup;
import org.apache.calcite.schema.lookup.LikePattern;
import org.apache.calcite.schema.lookup.Lookup;
Expand Down Expand Up @@ -88,7 +87,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 +101,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

0 comments on commit 9321bbc

Please sign in to comment.