|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eigenbase.relopt.RelOptRule org.eigenbase.rel.convert.ConverterRule
public abstract class ConverterRule
Abstract base class for a rule which converts from one calling convention to another without changing semantics.
Nested Class Summary | |
---|---|
private static class |
ConverterRule.ConverterRelOptRuleOperand
|
Field Summary | |
---|---|
private RelTrait |
inTrait
|
private RelTrait |
outTrait
|
Fields inherited from class org.eigenbase.relopt.RelOptRule |
---|
ANY, description, operands |
Constructor Summary | |
---|---|
ConverterRule(Class clazz,
RelTrait in,
RelTrait out,
String description)
Creates a ConverterRule . |
Method Summary | |
---|---|
abstract RelNode |
convert(RelNode rel)
|
RelTrait |
getInTrait()
|
CallingConvention |
getOutConvention()
Returns the calling convention of the result of firing this rule, null if not known. |
RelTrait |
getOutTrait()
Returns the trait which will be modified as a result of firing this rule, or null if the rule is not a converter rule. |
RelTraitDef |
getTraitDef()
|
boolean |
isGuaranteed()
Returns true if this rule can convert any relational expression of the input convention. |
void |
onMatch(RelOptRuleCall call)
Receives notification about a rule match. |
Methods inherited from class org.eigenbase.relopt.RelOptRule |
---|
convert, equals, equals, getOperand, getOperands, hashCode, matches, mergeTraitsAndConvert, mergeTraitsAndConvert, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private final RelTrait inTrait
private final RelTrait outTrait
Constructor Detail |
---|
public ConverterRule(Class clazz, RelTrait in, RelTrait out, String description)
ConverterRule
.
clazz
- Type of relational expression to consider convertingin
- Trait of relational expression to consider convertingout
- Trait which is converted todescription
- Description of ruleMethod Detail |
---|
public CallingConvention getOutConvention()
RelOptRule
getOutConvention
in class RelOptRule
public RelTrait getOutTrait()
RelOptRule
getOutTrait
in class RelOptRule
public RelTrait getInTrait()
public RelTraitDef getTraitDef()
public abstract RelNode convert(RelNode rel)
public boolean isGuaranteed()
The union-to-java converter, for example, is not guaranteed, because it only works on unions.
public void onMatch(RelOptRuleCall call)
RelOptRule
call.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.eigenbase.rel.RelNode)
to
register the expression.
onMatch
in class RelOptRule
call
- Rule callRelOptRule.matches(RelOptRuleCall)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |