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

MXP-2662 Remove caching lookup to prevent further issues with inconsistencies #8

Merged
merged 1 commit into from
Jul 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading