[
https://issues.apache.org/jira/browse/CALCITE-4770?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17414679#comment-17414679
]
xzh_dz commented on CALCITE-4770:
---------------------------------
[~asolimando]
Thanks for your review.I had added some cases in doc.It will be helpful to
understand the document.
As [~wojustme] said, The two materialized view recognition frameworks have
their own advantages and disadvantages.
* *`SubstitutionVisitor#go` :* bottom-up operator matching.
* *`MaterializedViewRule#perform` :* Analyze the structure information of the
operator to complete the matching.
We should put the function of searching materialized view before materialized
view recognition.Putting materialized view recognition conditions before
recognition is very helpful for both frameworks.Materialized view recognition
should take more responsibility for rewriting materialized views.The existing
operator matching data structure is complex and difficult to expand, such as
user-defined functions.In the project, the rules of the materialized
recognition framework are difficult to extend, so I have implemented custom
[materialized recognition rules|https://github.com/apache/calcite/pull/2094]
and [normalization rules|https://github.com/apache/calcite/pull/2262].The new
implementation is very concise and extensible.The new implementation is to
extract the conditions of materialized view recognition as feature index.By the
way, the ability of materialized view recognition is still insufficient, and I
will continue to improve it.
> Design of SearchMvService
> -------------------------
>
> Key: CALCITE-4770
> URL: https://issues.apache.org/jira/browse/CALCITE-4770
> Project: Calcite
> Issue Type: New Feature
> Reporter: xzh_dz
> Priority: Major
>
> In the data system, materialized view can speed up SQL query. Materialized
> view represents the pre-calculated SQL logic of the target table and contains
> real data. In the project, we use materialized views to speed up SQL queries,
> use the materialized view recognition technology to identify materialized
> views, and enhance the ability of materialized recognition. However, with
> more and more materialized views , materialized view recognition takes a lot
> of time, which seriously affects the performance of SQL queries. With this
> problem, we propose a design of accurate search materialized view based on
> operator features.
> DOC:[Design of
> SearchMvService|[https://docs.google.com/document/d/1mmAsK_uW-fBs893JERP1gspMurX2lNXcVGeesP4XUqQ/edit]]
> Welcome to discuss and expect more feedback,thank you.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)