public static class ReduceExpressionsRule.CalcReduceExpressionsRule extends ReduceExpressionsRule
Calc.ReduceExpressionsRule.CalcReduceExpressionsRule, ReduceExpressionsRule.CaseShuttle, ReduceExpressionsRule.FilterReduceExpressionsRule, ReduceExpressionsRule.JoinReduceExpressionsRule, ReduceExpressionsRule.ProjectReduceExpressionsRule, ReduceExpressionsRule.ReducibleExprLocator, ReduceExpressionsRule.RexReplacerCALC_INSTANCE, EXCLUSION_PATTERN, FILTER_INSTANCE, JOIN_INSTANCE, matchNullability, PROJECT_INSTANCEdescription, operands, relBuilderFactory| Constructor and Description |
|---|
CalcReduceExpressionsRule(Class<? extends Calc> calcClass,
boolean matchNullability,
RelBuilderFactory relBuilderFactory) |
CalcReduceExpressionsRule(Class<? extends Calc> calcClass,
RelBuilderFactory relBuilderFactory)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
protected RelNode |
createEmptyRelOrEquivalent(RelOptRuleCall call,
Calc input)
For static schema systems, a filter that is always false or null can be
replaced by a values operator that produces no rows, as the schema
information can just be taken from the input Rel.
|
void |
onMatch(RelOptRuleCall call)
Receives notification about a rule match.
|
findReducibleExps, predicateConstants, pushPredicateIntoCase, reduceExpressions, reduceExpressions, reduceExpressions, reduceExpressionsInternal, substituteany, convert, convert, convertList, convertOperand, equals, equals, getOperand, getOperands, getOutConvention, getOutTrait, hashCode, matches, none, operand, operand, operand, operand, operand, some, toString, unordered@Deprecated public CalcReduceExpressionsRule(Class<? extends Calc> calcClass, RelBuilderFactory relBuilderFactory)
public CalcReduceExpressionsRule(Class<? extends Calc> calcClass, boolean matchNullability, RelBuilderFactory relBuilderFactory)
public void onMatch(RelOptRuleCall call)
RelOptRulecall.rels holds the set of relational
expressions which match the operands to the rule;
call.rels[0] is the root expression.
Typically a rule would check that the nodes are valid matches, creates
a new expression, then calls back RelOptRuleCall.transformTo(org.apache.calcite.rel.RelNode, java.util.Map<org.apache.calcite.rel.RelNode, org.apache.calcite.rel.RelNode>) to
register the expression.
onMatch in class RelOptRulecall - Rule callRelOptRule.matches(RelOptRuleCall)protected RelNode createEmptyRelOrEquivalent(RelOptRuleCall call, Calc input)
The default implementation of this method is to call
RelBuilder.empty(), which for the static schema will be optimized
to an empty
Values.
input - rel to replace, assumes caller has already determined
equivalence to Values operation for 0 records or a
false filter.Copyright © 2012–2018 The Apache Software Foundation. All rights reserved.