calcite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mark pasterkamp <>
Subject Query rewriting materialized view rules
Date Mon, 15 Oct 2018 12:05:49 GMT

I have some confusion regarding the query rewriting rules in Calcite and I was hoping someone
could help me with that.
Looking at the documentation of materialized views
and in the source code, I found there are 2 systems in place for rewriting queries to use
materialized views. There is the unify rules found in
with an extension to materialized views found in
And there is the materialized view rules found in

Since I am not that experienced working with Calcite, I was wondering if someone could shed
some light about these 2 query rewriting systems. Are they supposed to be used independently
or in conjunction? Do they try to solve the same thing or is one rewriting system better for
some queries than others? (for instance, if I want a query to be rewritten to use materialized
views, would that better fit the MaterializedViewSubstitutionVisitor or the AbstractMaterializedViewRule).

If someone could help me out to better understand how calcite does its rewritings, that would
be great.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message