|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eigenbase.relopt.RelOptRule com.lucidera.lcs.LcsIndexAccessRule
public class LcsIndexAccessRule
LcsIndexAccessRule is a rule for converting FilterRel+LcsRowScanRel into LcsIndexAccessRel (when the filter has the appropriate form).
Field Summary |
---|
Fields inherited from class org.eigenbase.relopt.RelOptRule |
---|
ANY, description, operands |
Constructor Summary | |
---|---|
LcsIndexAccessRule(RelOptRuleOperand operand,
String id)
Creates an LcsIndexAccessRule. |
Method Summary | |
---|---|
private RelNode |
addNewIndexAccessRel(RelNode oldIndexAccessRel,
RelOptRuleCall call,
int rowScanRelPosInCall,
LcsIndexOptimizer.CandidateIndex candidate,
Double rowScanInputSelectivity)
|
private void |
buildColumnFilters(Integer[] residualColumns,
RelTraitSet callTraits,
RelNode[] valueRels,
int residualColumnCount,
List<SargBinding> residualSargBindingList,
LcsRowScanRel origRowScan)
|
private void |
considerIndex(RelOptRuleCall call,
int rowScanRelPosInCall,
SargRexAnalyzer rexAnalyzer,
List<SargBinding> sargBindingList)
|
private static RelDataType |
getIndexInputType(FennelRel rel,
FemLocalIndex index,
int matchedPos)
Create a type descriptor for the rows representing index search keys along with their directives, given an index and the number of matching keys from the index. |
private static List<SargIntervalSequence> |
getIndexSargSeq(FemLocalIndex index,
int matchedPos,
Map<CwmColumn,SargIntervalSequence> col2SeqMap)
|
CallingConvention |
getOutConvention()
Returns the calling convention of the result of firing this rule, null if not known. |
private static List<SargBinding> |
getResidualSargBinding(LcsRowScanRel origRowScan,
List<SargBinding> sargBindingList,
Map<FemLocalIndex,Integer> index2PosMap,
List<SargBinding> nonResidualList)
|
private static List<List<LcsIndexOptimizer.SargColumnFilter>> |
getSargColFilterLists(LcsRowScanRel origRowScan,
List<SargBinding> sargBindingList,
Map<CwmColumn,SargIntervalSequence> col2SeqMap)
|
private static RelDataType |
getSearchKeyRowType(FennelRel rel,
FemAbstractAttribute[] searchColumns)
Create a type descriptor for the rows representing search keys along with their directives, given an array of the attributes representing the search columns. |
void |
onMatch(RelOptRuleCall call)
Receives notification about a rule match. |
private void |
transformCall(RelOptRuleCall call,
RelNode rel,
RexNode extraFilter)
|
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 LcsIndexAccessRule(RelOptRuleOperand operand, String id)
operand
- Root operand, must not be nullid
- Description of ruleMethod Detail |
---|
public CallingConvention getOutConvention()
RelOptRule
getOutConvention
in class RelOptRule
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)
private void considerIndex(RelOptRuleCall call, int rowScanRelPosInCall, SargRexAnalyzer rexAnalyzer, List<SargBinding> sargBindingList)
private void buildColumnFilters(Integer[] residualColumns, RelTraitSet callTraits, RelNode[] valueRels, int residualColumnCount, List<SargBinding> residualSargBindingList, LcsRowScanRel origRowScan)
private void transformCall(RelOptRuleCall call, RelNode rel, RexNode extraFilter)
private static List<SargIntervalSequence> getIndexSargSeq(FemLocalIndex index, int matchedPos, Map<CwmColumn,SargIntervalSequence> col2SeqMap)
private static List<List<LcsIndexOptimizer.SargColumnFilter>> getSargColFilterLists(LcsRowScanRel origRowScan, List<SargBinding> sargBindingList, Map<CwmColumn,SargIntervalSequence> col2SeqMap)
private static List<SargBinding> getResidualSargBinding(LcsRowScanRel origRowScan, List<SargBinding> sargBindingList, Map<FemLocalIndex,Integer> index2PosMap, List<SargBinding> nonResidualList)
private RelNode addNewIndexAccessRel(RelNode oldIndexAccessRel, RelOptRuleCall call, int rowScanRelPosInCall, LcsIndexOptimizer.CandidateIndex candidate, Double rowScanInputSelectivity)
private static RelDataType getSearchKeyRowType(FennelRel rel, FemAbstractAttribute[] searchColumns)
rel
- the table scan node that is being optimizedsearchColumns
- array of column attributes representing the search
keysprivate static RelDataType getIndexInputType(FennelRel rel, FemLocalIndex index, int matchedPos)
rel
- the table scan node that is being optimizedindex
- the index descriptormatchedPos
- the length of matched prefix in the index key
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |