public class AggregateUnionAggregateRule extends RelOptRule
| Modifier and Type | Field and Description |
|---|---|
static AggregateUnionAggregateRule |
AGG_ON_FIRST_INPUT
Instance that matches an
Aggregate as the left input of
Union. |
static AggregateUnionAggregateRule |
AGG_ON_SECOND_INPUT
Instance that matches an
Aggregate as the right input of
Union. |
static AggregateUnionAggregateRule |
INSTANCE
Instance that matches an
Aggregate as either input of
Union. |
description, operands, relBuilderFactory| Constructor and Description |
|---|
AggregateUnionAggregateRule(Class<? extends Aggregate> aggregateClass,
Class<? extends Union> unionClass,
Class<? extends RelNode> firstUnionInputClass,
Class<? extends RelNode> secondUnionInputClass,
RelBuilderFactory relBuilderFactory,
String desc)
Creates a AggregateUnionAggregateRule.
|
AggregateUnionAggregateRule(Class<? extends Aggregate> aggregateClass,
RelFactories.AggregateFactory aggregateFactory,
Class<? extends Union> unionClass,
RelFactories.SetOpFactory setOpFactory)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
void |
onMatch(RelOptRuleCall call)
Receives notification about a rule match.
|
any, convert, convert, convertList, convertOperand, equals, equals, getOperand, getOperands, getOutConvention, getOutTrait, hashCode, matches, none, operand, operand, operand, operand, operand, some, toString, unorderedpublic static final AggregateUnionAggregateRule AGG_ON_FIRST_INPUT
Aggregate as the left input of
Union.public static final AggregateUnionAggregateRule AGG_ON_SECOND_INPUT
Aggregate as the right input of
Union.public static final AggregateUnionAggregateRule INSTANCE
Aggregate as either input of
Union.
Because it matches RelNode for each input of Union, it
will create O(N ^ 2) matches, which may cost too much during the popMatch
phase in VolcanoPlanner. If efficiency is a concern, we recommend that you
use AGG_ON_FIRST_INPUT and AGG_ON_SECOND_INPUT instead.
public AggregateUnionAggregateRule(Class<? extends Aggregate> aggregateClass, Class<? extends Union> unionClass, Class<? extends RelNode> firstUnionInputClass, Class<? extends RelNode> secondUnionInputClass, RelBuilderFactory relBuilderFactory, String desc)
@Deprecated public AggregateUnionAggregateRule(Class<? extends Aggregate> aggregateClass, RelFactories.AggregateFactory aggregateFactory, Class<? extends Union> unionClass, RelFactories.SetOpFactory setOpFactory)
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)Copyright © 2012–2018 The Apache Software Foundation. All rights reserved.