Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
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:
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";
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
Attachments
Issue Links
- relates to
-
CALCITE-4395 Add an interface in RelOptMaterializations to allow registering normalization rules
- Open
- links to