|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eigenbase.relopt.RelOptRule net.sf.farrago.namespace.impl.MedAbstractFennelProjectionRule
public abstract class MedAbstractFennelProjectionRule
MedAbstractFennelProjectionRule is a base class for implementing projection rules on different storage mechanisms
Field Summary |
---|
Fields inherited from class org.eigenbase.relopt.RelOptRule |
---|
ANY, description, operands |
Constructor Summary | |
---|---|
MedAbstractFennelProjectionRule(RelOptRuleOperand operand)
Creates a new MedAbstractFennelProjectionRule object. |
Method Summary | |
---|---|
RelNode |
createNewRelNode(RelNode projectedScan,
ProjectRel origProject,
boolean needRename,
ProjectRel newProject)
Creates new RelNodes replacing/removing the original project/row scan |
boolean |
createProjectionList(FennelRel origScan,
ProjectRel projRel,
List<Integer> projectedColumns,
PushProjector.ExprCondition preserveExprCondition,
RexNode defaultExpr,
List<ProjectRel> newProjList)
Creates projection list for scan. |
CallingConvention |
getOutConvention()
Returns the calling convention of the result of firing this rule, null if not known. |
protected Integer |
mapFieldRef(RexNode exp,
List<String> origFieldName,
RelDataType rowType)
|
protected Integer |
mapProjCol(RexNode exp,
List<String> origFieldName,
RelDataType rowType)
Maps a projection expression to its underlying field reference |
abstract void |
onMatch(RelOptRuleCall call)
Receives notification about a rule match. |
Methods inherited from class org.eigenbase.relopt.RelOptRule |
---|
convert, equals, equals, getOperand, getOperands, getOutTrait, hashCode, matches, mergeTraitsAndConvert, mergeTraitsAndConvert, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MedAbstractFennelProjectionRule(RelOptRuleOperand operand)
operand
- root operand to pass to RelOptRule constructorMethod Detail |
---|
public CallingConvention getOutConvention()
RelOptRule
getOutConvention
in class RelOptRule
public abstract 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)
public boolean createProjectionList(FennelRel origScan, ProjectRel projRel, List<Integer> projectedColumns, PushProjector.ExprCondition preserveExprCondition, RexNode defaultExpr, List<ProjectRel> newProjList)
origScan
- row scan underneath the projectprojRel
- ProjectRel that we will be creating the projection forprojectedColumns
- returns a list of the projected column ordinals,
if it is possible to projectpreserveExprCondition
- condition that identifies special
expressions that should be preserved in the projectiondefaultExpr
- expression to be used in the projection if no fields
or special columns are selectednewProjList
- returns a new projection RelNode corresponding to a
projection that now references a rowscan that is projecting the input
references that were extracted from the original projection expressions;
if the original expression didn't contain expressions, then this list is
returned empty
protected Integer mapProjCol(RexNode exp, List<String> origFieldName, RelDataType rowType)
exp
- expression to be mappedorigFieldName
- returns field name corresponding to the field
referencerowType
- row from which the field reference originated
protected Integer mapFieldRef(RexNode exp, List<String> origFieldName, RelDataType rowType)
public RelNode createNewRelNode(RelNode projectedScan, ProjectRel origProject, boolean needRename, ProjectRel newProject)
projectedScan
- new scan that is now projectedorigProject
- original projectionneedRename
- true if fields from the row scan need to be renamednewProject
- projection that contains the new projection
expressions, in the case where the original projection cannot be removed
because it projects expressions
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |