Class CombineFilterRule


  • @API(EXPERIMENTAL)
    public class CombineFilterRule
    extends PlannerRule<LogicalFilterExpression>
    A simple rule that combines two nested filter plans and combines them into a single filter plan with a conjunction of the two filters.
     
         +----------------------------+                               +-------------------------------------+
         |                            |                               |                                     |
         |  LogicalFilterExpression   |                               |  LogicalFilterExpression            |
         |                 upperPred  |                               |             lowerPred' ^ upperPred  |
         |                            |                               |                                     |
         +-------------+--------------+                               +------------------+------------------+
                       |                                                                 |
                       |  upperQun                                                       |
                       |                    +------------------->                        |
         +-------------+--------------+                                                  |
         |                            |                                                  |
         |  LogicalFilterExpression   |                                                  |
         |                 lowerPred  |                                                  |
         |                            |                                                  |
         +-------------+--------------+                                                  |
                       |                                                                 | upperQun'
                       |  lowerQun                                                       |
                       |                                                                 |
                 +-----+-----+                                                           |
                 |           |                                                           |
                 |  anyRef   |   +-------------------------------------------------------+
                 |           |
                 +-----------+
     
     
    where lowerPred has been rebased (pulled up through upperQun). upperQun' on the right side is still a duplicated quantifier but it shares the same name.