1

I want to setup postgres as a datasource for calcite and make use of calcite's abilities to rewrite queries using materialized views. However, when I try to create a materialized view through calcite I get a postgres error about an insert into relation which doesn't exists.

Upon further inspection, it seems like calcite never creates a materialized view but just translates the query into an "insert into" command and sends it to postgres (which fails because I originally wanted to create this view).

So my question is: how am I supposed to create a materialized view through calcite on postgres?

(I have also asked this question on the mailing list, however it seemed more fitting to post it here)

1 Answer 1

0

Maybe the solution is defining Lattices when defining schema and letting Calcite create materialized views for you.

When you define materialized view in your schema definition, Calcite just assumes that you already created it in Postgres and that it can use it freely. That's why it makes insert into statement.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.