kramerul commented on code in PR #4100:
URL: https://github.com/apache/calcite/pull/4100#discussion_r2002784787
##########
core/src/main/java/org/apache/calcite/jdbc/CalciteSchema.java:
##########
@@ -322,7 +322,6 @@ public final NavigableMap<String, CalciteSchema>
getSubSchemaMap() {
final ImmutableSortedMap.Builder<String, CalciteSchema> builder =
new ImmutableSortedMap.Builder<>(NameSet.COMPARATOR);
builder.putAll(subSchemaMap.map());
- addImplicitSubSchemaToBuilder(builder);
Review Comment:
I think it should look like this
```java
public final NavigableMap<String, CalciteSchema> getSubSchemaMap() {
// Build a map of implicit sub-schemas first, then explicit sub-schemas.
// If there are implicit and explicit with the same name, explicit wins.
final ImmutableSortedMap.Builder<String, CalciteSchema> builder =
new ImmutableSortedMap.Builder<>(NameSet.COMPARATOR);
Lookup<CalciteSchema> schemas = subSchemas();
for ( String name : schemas.getNames(LikePattern.any())) {
builder.put(name, schemas.get(name));
}
return builder.build();
}
```
##########
core/src/main/java/org/apache/calcite/jdbc/CalciteSchema.java:
##########
@@ -322,7 +322,6 @@ public final NavigableMap<String, CalciteSchema>
getSubSchemaMap() {
final ImmutableSortedMap.Builder<String, CalciteSchema> builder =
new ImmutableSortedMap.Builder<>(NameSet.COMPARATOR);
builder.putAll(subSchemaMap.map());
- addImplicitSubSchemaToBuilder(builder);
Review Comment:
I think it should look like this
```java
public final NavigableMap<String, CalciteSchema> getSubSchemaMap() {
final ImmutableSortedMap.Builder<String, CalciteSchema> builder =
new ImmutableSortedMap.Builder<>(NameSet.COMPARATOR);
Lookup<CalciteSchema> schemas = subSchemas();
for ( String name : schemas.getNames(LikePattern.any())) {
builder.put(name, schemas.get(name));
}
return builder.build();
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]