Thanks for the reply Julian!

I should post more details: right now we have a Metadata class which
implements the Metadata spec. All of that seems to work fine. Where we are
stuck is in how to read the information_schema metadata from JDBC into the
planner. One hackish solution is to open a DB connection when our Metadata
getter is called on TableScan, and run a query against the underlying
database. However, is there existing functionality to read in external
statistics and metadata - for example things like table statistics.

Madhav

On Mon, Nov 18, 2019 at 8:42 PM Julian Hyde <[email protected]> wrote:

> May need to be a new type of metadata (i.e. a class that implements
> Metadata and is acquired via RelMetadataQuery) [1] [2].
>
> Julian
>
> [1]
> https://calcite.apache.org/apidocs/org/apache/calcite/rel/metadata/Metadata.html
> <
> https://calcite.apache.org/apidocs/org/apache/calcite/rel/metadata/Metadata.html>
>
>
> [2]
> https://calcite.apache.org/apidocs/org/apache/calcite/rel/metadata/package-summary.html
> <
> https://calcite.apache.org/apidocs/org/apache/calcite/rel/metadata/package-summary.html>
>
>
> > On Nov 18, 2019, at 5:40 PM, Madhav Suresh <[email protected]>
> wrote:
> >
> > Hi All,
> >
> > We have security type information that we want to bring into the
> optimizer.
> > Consider the query:
> > SELECT a FROM a,b where a.id=b.id AND a.p > 10;
> > We want the optimizer to know that a.id, b.id are "public" attributes,
> and
> > a.p is a private attribute. Currently we have type information stored
> > inform information_schema in postgres. Right now our prototype considers
> > privacy as a RelTrait. We are stuck on what the best way to read this
> > information is. Is there a similar example, or template on how to read in
> > table metadata into calcite?
> >
> > Madhav
>
>

Reply via email to