[
https://issues.apache.org/jira/browse/CALCITE-5513?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17705808#comment-17705808
]
jhonye commented on CALCITE-5513:
---------------------------------
Thanks [~julianhyde].
I know the Lattice and just read the LatticeSuggester.java code, Some ideas is
similar.
The recommend rule will find the data model(join relation, support left join
later), and predicate (Filter), and used columns(Project), and aggregate keys
(Aggregate) to build the materialized view; the RexNode pattern maybe
complicated, like sum(case when ...), udf(ReInputRef) etc.
I use the reverse logic of MaterializedViewRule to find the appropriate
materialized view.
> Add Support Use Sql to recommend Materialized View
> ---------------------------------------------------
>
> Key: CALCITE-5513
> URL: https://issues.apache.org/jira/browse/CALCITE-5513
> Project: Calcite
> Issue Type: New Feature
> Components: core
> Affects Versions: 1.33.0
> Reporter: jhonye
> Assignee: jhonye
> Priority: Major
> Attachments: image-2023-03-27-16-30-45-886.png
>
> Original Estimate: 504h
> Remaining Estimate: 504h
>
> How to use:
> Input: SQL
> Output: SQL
>
> Calcite Core:
> 1. In Volcano Plan and iterator to optimize the Logical Plan.
> 2. A rule recognize the Logical Plan and recommend materialized view Logical
> Plan list which can rewrite the origin Logical Plan .
> 3. the recommend algorithm need to design. (already done.)
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)