Skip to content
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 @@ -516,6 +516,7 @@ protected FeatureProviderSql(
this.scheduler = scheduler;
this.subdecoders = subdecoders;
this.cronJob = null;
this.tableSchemas = null;
}

private static PathParserSql createPathParser2(SqlPathDefaults sqlPathDefaults, Cql cql) {
Expand Down Expand Up @@ -808,14 +809,19 @@ protected Optional<String> getRunnerError(ConnectionInfo connectionInfo) {
public Map<String, List<SchemaSql>> getSourceSchemas() {
QuerySchemaDeriver querySchemaDeriver = new QuerySchemaDeriver(pathParser3);

this.tableSchemas =
getData().getTypes().entrySet().stream()
.map(
entry ->
Map.entry(
entry.getKey(),
entry.getValue().accept(WITH_SCOPE_RETURNABLE).accept(querySchemaDeriver)))
.collect(ImmutableMap.toImmutableMap(Entry::getKey, Entry::getValue));
if (this.tableSchemas == null) {
this.tableSchemas =
getData().getTypes().entrySet().stream()
.map(
entry ->
Map.entry(
entry.getKey(),
entry
.getValue()
.accept(WITH_SCOPE_RETURNABLE)
.accept(querySchemaDeriver)))
.collect(ImmutableMap.toImmutableMap(Entry::getKey, Entry::getValue));
}

return this.tableSchemas;
}
Expand Down