Hi, Hongkang. Calcite has two ways to do query-rewriting, namely substitution, and rules[1]. MaterializedViewRule builds on the ideas presented in the paper[2], which does not talk much about outer-join rewriting. If you want to support outer join, you can try to use MaterializedViewSubstitutionVisitor.
[1] https://calcite.apache.org/docs/materialized_views.html#union-rewriting. [2] https://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.95.113 Best, Chunwei On Tue, Nov 23, 2021 at 3:00 PM hongkang jiang <[email protected]> wrote: > Hello everyone, > I have a question about that Calcite does not support outer join in > materialized view. I have been thinking for a long time and still haven't > figured it out. Could anyone help me answer the reason? Thanks very much. > I also found in Calcite's materialization a annotation like that Currently > we only support tablescan-project-filter-inner Join , And the method > MaterializedViewRule. IsValidRelNodePlan () will filter out the outer join. >
