You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@calcite.apache.org by XING JIN <ji...@gmail.com> on 2019/09/16 13:17:02 UTC
[DISCUSS] Refinement for Substitution-Based MV Matching
Hi Contributors,
I'm writing this email and hope to start a discussion about
https://issues.apache.org/jira/browse/CALCITE-3334 .
The approach of substitution-based materialized view matching is effective
for its simplicity and extensibility. But now and then we confront
materialization matching failures especially for SQLs with multiple nested
levels. We keep thinking that how many more rules still need to be added
and can we enumerate all the common matching patterns.
The existing rules in SubstitutionVisitor &
MaterializedViewSubstitutionVisitor are created by heuristic and
experience. They are quite straightforward. But from my understanding the
design of rule set is not systematic enough. Especially compensating
Project or Filter are not given enough good care.
I raised a doc --
https://docs.google.com/document/d/1JpwGNFE3hw3yXb7W3-95-jXKClZC5UFPKbuhgYDuEu4
to
propose refinement for substitution-based materialized view matching from
two aspects:
1. Canonicalize before materialization matching;
2. Separate matching rules into two categories and enumerate matching
patterns which need to be covered by rules.
It's great if you can share some comments on this.
Best,
Jin
Re: [DISCUSS] Refinement for Substitution-Based MV Matching
Posted by XING JIN <ji...@gmail.com>.
Thanks a lot Danny and Haisheng for comments on the doc ~
And more comments are welcome ~
Best,
Jin
XING JIN <ji...@gmail.com> 于2019年9月16日周一 下午9:17写道:
> Hi Contributors,
>
> I'm writing this email and hope to start a discussion about
> https://issues.apache.org/jira/browse/CALCITE-3334 .
>
> The approach of substitution-based materialized view matching is effective
> for its simplicity and extensibility. But now and then we confront
> materialization matching failures especially for SQLs with multiple nested
> levels. We keep thinking that how many more rules still need to be added
> and can we enumerate all the common matching patterns.
>
> The existing rules in SubstitutionVisitor &
> MaterializedViewSubstitutionVisitor are created by heuristic and
> experience. They are quite straightforward. But from my understanding the
> design of rule set is not systematic enough. Especially compensating
> Project or Filter are not given enough good care.
>
> I raised a doc --
> https://docs.google.com/document/d/1JpwGNFE3hw3yXb7W3-95-jXKClZC5UFPKbuhgYDuEu4 to
> propose refinement for substitution-based materialized view matching from
> two aspects:
> 1. Canonicalize before materialization matching;
> 2. Separate matching rules into two categories and enumerate matching
> patterns which need to be covered by rules.
>
> It's great if you can share some comments on this.
>
> Best,
> Jin
>
>