kramerul commented on code in PR #4100:
URL: https://github.com/apache/calcite/pull/4100#discussion_r1950508686
##########
core/src/main/java/org/apache/calcite/jdbc/CachingCalciteSchema.java:
##########
@@ -117,15 +100,14 @@ private CachingCalciteSchema(@Nullable CalciteSchema
parent, Schema schema,
return this.cache;
}
- @Override protected @Nullable CalciteSchema getImplicitSubSchema(String
schemaName,
- boolean caseSensitive) {
- final long now = System.currentTimeMillis();
- final SubSchemaCache subSchemaCache = implicitSubSchemaCache.get(now);
- for (String schemaName2
- : subSchemaCache.names.range(schemaName, caseSensitive)) {
- return subSchemaCache.cache.getUnchecked(schemaName2);
- }
- return null;
+ @Override protected CalciteSchema createSubSchema(Schema schema, String
name) {
+ return new CachingCalciteSchema(this, schema, name);
+ }
+
+ @Override protected <S> Lookup<S> decorateLookup(Lookup<S> lookup) {
Review Comment:
I renamed it to `enhanceLookup`and changed the documentation in
`CalciteSchema`:
The derived class is able to enhance the lookup e.g. by introducing a cache
--
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]