private static class MaterializedViewSubstitutionVisitor.FilterToProjectUnifyRule1 extends SubstitutionVisitor.AbstractUnifyRule
SubstitutionVisitor.UnifyRule
that matches a
MutableFilter
to a
MutableProject
on top of a
MutableFilter
where the condition of the target
relation is weaker.
Example: target has a weaker condition and is a permutation projection of its child relation
Modifier and Type | Field and Description |
---|---|
static MaterializedViewSubstitutionVisitor.FilterToProjectUnifyRule1 |
INSTANCE |
queryOperand, slotCount, targetOperand
Modifier | Constructor and Description |
---|---|
private |
FilterToProjectUnifyRule1() |
Modifier and Type | Method and Description |
---|---|
SubstitutionVisitor.UnifyResult |
apply(SubstitutionVisitor.UnifyRuleCall call)
Applies this rule to a particular node in a query.
|
protected SubstitutionVisitor.UnifyRuleCall |
match(SubstitutionVisitor visitor,
MutableRel query,
MutableRel target) |
any, isValid, operand, query, target
copy
public static final MaterializedViewSubstitutionVisitor.FilterToProjectUnifyRule1 INSTANCE
public SubstitutionVisitor.UnifyResult apply(SubstitutionVisitor.UnifyRuleCall call)
SubstitutionVisitor.UnifyRule
Applies this rule to a particular node in a query. The goal is
to convert query
into target
. Before the rule is
invoked, Calcite has made sure that query's children are equivalent
to target's children.
There are 3 possible outcomes:
query
already exactly matches target
; returns
target
query
is sufficiently close to a match for
target
; returns target
query
cannot be made to match target
; returns
nullREVIEW: Is possible that we match query PLUS one or more of its ancestors?
apply
in class SubstitutionVisitor.UnifyRule
call
- Input parametersprotected SubstitutionVisitor.UnifyRuleCall match(SubstitutionVisitor visitor, MutableRel query, MutableRel target)
match
in class SubstitutionVisitor.UnifyRule
Copyright © 2012–2019 The Apache Software Foundation. All rights reserved.