I expected as much re: code documentation. Totally understandable, but I figured it couldn't hurt to check.
As for Cassandra and materialized views, that's exactly what I was thinking and the reason I opened the issue about updates to support Cassandra 3.x :) Calcite's automatic rewriting seems to work as expected when the materializations are manually defined. I'd like to see if I can get the adapter to automatically pull in materialized view definitions from Cassandra. Since CQL and SQL are so similar, I'm hoping it won't be too much of a challenge to have Calcite use the CQL definitions of the materialized views. -- Michael Mior mm...@uwaterloo.ca 2016-02-24 17:22 GMT-05:00 Julian Hyde <jh...@apache.org>: > By the way, interesting that you are interested in Cassandra and > materialized views. Cassandra announced materialized view support > recently[1] but they solved only half of a problem (not an > insignificant half, I hasten to add), namely materialized view > maintenance. They don't transparently substitute them into the query - > you have to reference the materialized view explicitly in y our query > - so in my book they've not delivered materialized view support. If > you're planning to deliver REAL materialized view support to Cassandra > that would be awesome. > > Julian > > [1] > http://www.datastax.com/dev/blog/new-in-cassandra-3-0-materialized-views > > > On Wed, Feb 24, 2016 at 2:17 PM, Julian Hyde <jh...@apache.org> wrote: > > 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. > > > > Julian > > > > > > On Wed, Feb 24, 2016 at 1:40 PM, Michael Mior <mm...@uwaterloo.ca> > 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 > >> mm...@uwaterloo.ca >