Or you can config your framework config with a schema implemented by your self 
[1], the getTable should be implemented correctly [2]. Then config the 
CalciteCatalogReader with the schema and schemaPath [3].
The validator used your CalciteCatalogReader will recognize your tables in 
Postgres.

[1] 
https://github.com/apache/calcite/blob/a8e71f9f295e36e472d9f650d1c76d2501e1fdbf/core/src/main/java/org/apache/calcite/tools/FrameworkConfig.java#L55
[2] 
https://github.com/apache/calcite/blob/a8e71f9f295e36e472d9f650d1c76d2501e1fdbf/core/src/main/java/org/apache/calcite/schema/Schema.java#L63
[3] 
https://github.com/apache/calcite/blob/a8e71f9f295e36e472d9f650d1c76d2501e1fdbf/core/src/main/java/org/apache/calcite/prepare/CalciteCatalogReader.java#L100

Best,
Danny Chan
在 2019年4月5日 +0800 PM10:00,Mark Pasterkamp <[email protected]>,写道:
> Dear all,
>
> I have connected my postgresql database as a datasource to calcite. I am
> however not able to find out how I can expose the existing materialized
> views in postgres to calcite. I am unable to find much help on the internet
> so if anyone is knowledgeable about this I would really appreciate a small
> code example as to how this is supposed to work in Java.
>
>
> Mark

Reply via email to