hello,
     I'm reading code about star materialized views ,These problems keeps 
making me puzzled. 


can you tell me some information about the lattice and 
star-materialization-view ?
from the code ,I find two place about star-materialization-view:
1. before use materialization by UnifyRule 

private static List<RelNode> substitute(
      RelNode root, RelOptMaterialization materialization,
      List<SubstitutionVisitor.UnifyRule> materializationRules) {
    // First, if the materialization is in terms of a star table, rewrite
    // the query in terms of the star table.
    if (materialization.starRelOptTable != null) {
      RelNode newRoot = RelOptMaterialization.tryUseStar(root,
          materialization.starRelOptTable);
    }
2. AggregateStarTableRule,and it use lattice.

What I don't understand that why star match in the two place? why the lattices 
only used in the second one?

I also confused about lattice's effecttions. is it  just  a Schema description 
for star aggreation view?
from the official website document,the lattice's introduction is as follows:
A lattice is a framework for creating and populating materialized views, and 
for recognizing that a materialized view can be used to solve a particular 
query.
but in the project,I only find it used in AggregateStarTableRule

I don't find any code about that:  a lattice is a partially ordered set where 
any two elements have a unique greatest lower bound and least upper bound

I look forward to hearing from you very much
thanks





 rules transformation
Permalink


Reply via email to