You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by GitBox <gi...@apache.org> on 2019/10/14 10:06:31 UTC

[GitHub] [calcite] jinxing64 opened a new pull request #1504: [CALCITE-3409] Add an interface in MaterializedViewSubstitutionVisito…

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:
users@infra.apache.org


With regards,
Apache Git Services