jinxing64 opened a new pull request #1504: [CALCITE-3409] Add an interface in 
MaterializedViewSubstitutionVisito…
URL: https://github.com/apache/calcite/pull/1504
 
 
   …r to allow registering UnifyRule (Jin Xing)
   
   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

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to