The policy that CalciteSchema should be private to Calcite hasn’t changed (it is a public interface only because… Java).
It has never been private to the JDBC adapter. (The JDBC adapter readers from JDBC sources and is in org.apache.calcite.adapter.jdbc, whereas CalciteSchema is in org.apache.calcite.jdbc, which makes Calcite look like a JDBC database.) CalciteSchema is an abstract class. There are two concrete implementations: CachingCalciteSchema which remembers what it has read from the underlying source, and SimpleCalciteSchema that caches nothing. I know Drill (and I guess now Dremio) has a different policy, so how about adding an implementation of CalciteSchema that has that policy? I have been asking for this for a long time. If we did what you suggest, and make CalciteSchema (or a base interface of it) a public API then people will go and create implementations of that interface that will get broken all the time. Julian > On Apr 3, 2018, at 4:10 PM, Laurent Goujon <[email protected]> wrote: > > Hi, > > While working on rebasing our code on top of Calcite 1.16, I noticed that a > new method was introduced to SqlValidatorCatalogReader: CalciteSchema > `SqlValidatorCatalogReader#getRootSchema()` (not recently, it was added for > Calcite 1.12) > > My understanding of CalciteSchema was that this class is private and > specific to the JDBC adapter, but looking at the code base, I see it used > in lots of various places. Has the policy changed? if so, would it make > sense to change it to an interface or to relax the class? The current model > where all informations are stored in maps doesn't match our own model of > navigating our catalog. > > Cheers, > > Laurent
