calcite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Julian Hyde <>
Subject Re: Materialized view rewriting
Date Wed, 24 Feb 2016 22:17:27 GMT
As is typical for complex pieces of code like this, the documentation
is in the code (and the unit test). It's probably not what you wanted
to hear, but the code mutates quite fast and so if we'd written a
design doc a few months ago it would be partially inaccurate.

I, Maryann Xue and Amogh Margoor are the main authors of this code.

Suggest you find a relevant test case in MaterializationTest (or write
a new one) and run it with trace enabled and/or in a debugger. You
will see the process of matching an expression to a MV bottom up if
you watch each call to UnifyRule.unify.


On Wed, Feb 24, 2016 at 1:40 PM, Michael Mior <> wrote:
> Is there any documentation anywhere on how the current implementation of
> query rewriting for materialized views work? Mostly I'm referring
> to MaterializedViewSubstitutionVisitor. There's a lot of code to digest
> with not a lot of documentation and it would be helpful to have a reference
> to refer. Thanks!
> Cheers,
> --
> Michael Mior

View raw message