You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by GitBox <gi...@apache.org> on 2020/02/12 01:44:02 UTC

[GitHub] [calcite] DonnyZone edited a comment on issue #1792: [CALCITE-3775] Implicit lookup methods in SimpleCalciteSchema ignore case sensitivity parameter

DonnyZone edited a comment on issue #1792: [CALCITE-3775] Implicit lookup methods in SimpleCalciteSchema ignore case sensitivity parameter
URL: https://github.com/apache/calcite/pull/1792#issuecomment-584975246
 
 
   (1) `Schema` interface is provided to users. We'd better not bring much burden to users, even a `default` implementation. Moreover, it is uncertain whether a `Schema`'s concrete implementation (e.g., `JdbcSchema`) can push down case insensitive lookups to underlying datasources.
   Insteadly, `CalciteSchema` is a suitable place to implement case insensitive lookup. From my understanding (correct me if I am wrong), the initial design may be:
   ```
   Schema: interface for users (case sensitive)
      |
   CalciteSchema: wrapper around user-defined schema used internally, providing case (in)sensitive lookups
      |
   CachingCalciteSchema/SimpleCalciteSchema
   ```
   (2) 
   > Most of the implementations should be able to delegate case insensitive requests to NameMap, which would be OK for performance.
   
   I think `CachingCalciteSchema` has already achieved this goal. It caches tables and maintains them in `NameMap`.
   The javadoc of `CachingCalciteSchema` is:
   
   >  * Concrete implementation of {@link CalciteSchema} that caches tables,
   >  * functions and sub-schemas.
   
   While the javadoc of `SimpleCalciteSchema` is
   >  * A concrete implementation of {@link org.apache.calcite.jdbc.CalciteSchema}
   >  * that maintains minimal state.
   
   Therefore, `SimpleCalciteSchema` and `CachingCalciteSchema` play different roles. If we unify them for the seek of performance, we can just remove `SimpleCalciteSchema`.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services