[
https://issues.apache.org/jira/browse/CALCITE-3409?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17417679#comment-17417679
]
Stamatis Zampetakis commented on CALCITE-3409:
----------------------------------------------
Hey [~xzh_dz], the latest comments seem to imply that the changes in
{{RelOptPlanner}} interface are not very important and the new methods were
added just for testing purposes. If my interpretation is correct then the best
would be to avoid introducing public APIs just for testing.
However, I am not sure how somebody can take advantage of this new feature if
we cannot write a test case using public APIs.
Anyways, I don't have much time to review this properly so it is better to ask
in the dev@ list for somebody to take over this and push it forward.
> Add an interface in MaterializedViewSubstitutionVisitor to allow registering
> UnifyRule
> --------------------------------------------------------------------------------------
>
> Key: CALCITE-3409
> URL: https://issues.apache.org/jira/browse/CALCITE-3409
> Project: Calcite
> Issue Type: Improvement
> Reporter: Jin Xing
> Assignee: Jin Xing
> Priority: Major
> Labels: pull-request-available
> Time Spent: 5h 50m
> Remaining Estimate: 0h
>
> In current code of MaterializedViewSubstitutionVisitor, all matching rules
> are internal defined. The existing rules support the most popular scenarios.
> But my customers sometimes ask for the ability to self define some matching
> rules, thus to support some special scenarios.
> I take below example as an illustration:
> {code:java}
> Query:
> select * from table
> where from_unixtime(_EVENT_TIME_, "yyyymmdd hh") >= "20190909 00"
> and from_unixtime(_EVENT_TIME_, "yyyymmdd hh") <= "20190909 23" ;
> Materialized View:
> select * from table
> where from_unixtime(_EVENT_TIME_, "yyyymmdd") = "20190909";{code}
> It's hard to enumerate the matching pattern for different functions in
> internal matching rules. We can expose a method to register new UnifyRules
> and allow user to extend the ability of MV matching
--
This message was sent by Atlassian Jira
(v8.3.4#803005)