|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eigenbase.rel.AbstractRelNode org.eigenbase.rel.SingleRel net.sf.farrago.fennel.rel.FennelSingleRel net.sf.farrago.fennel.rel.FennelOptionalRel com.lucidera.lcs.LcsIndexSearchRel
public class LcsIndexSearchRel
LcsIndexSearchRel is a relation for reading from an unclustered index. It has two major modes. In the "full scan" mode, it has no input and it scans the entire index. In the "key search" mode, it has one input and only searches for keys produced by its child.
Key search relations, have two formats for input. A single key set may be specified, in which case, exact matches for keys are returned. The double key format is a more versatile format in which both points and ranges can be represented. The input produces two sets of keys, one for a lower bound and one for an upper bound. The upper and lower bounds are described by directives as OPEN, or CLOSED, etc.
The output of an index scan may be expanded with fields from its input, making it more useful for implementing an index-based join.
Field Summary | |
---|---|
(package private) boolean |
fullScan
Whether to perform a full scan |
(package private) FemLocalIndex |
index
Index to use for access. |
Double |
indexSelectivity
|
(package private) Integer[] |
inputDirectiveProj
|
(package private) Integer[] |
inputJoinProj
|
(package private) Integer[] |
inputKeyProj
|
(package private) boolean |
isOuter
|
(package private) boolean |
isUniqueKey
|
(package private) boolean |
isVisibleInExplain
|
(package private) LcsTable |
lcsTable
The table containing the index to be scanned |
(package private) Integer[] |
projectedColumns
Array of 0-based flattened column ordinals to project; if null, project bitmap columns. |
(package private) FennelRelParamId |
rowLimitParamId
|
(package private) FennelRelParamId |
startRidParamId
|
Fields inherited from class org.eigenbase.rel.AbstractRelNode |
---|
digest, id, rowType, traits |
Fields inherited from interface net.sf.farrago.query.FennelRel |
---|
FENNEL_EXEC_CONVENTION |
Fields inherited from interface org.eigenbase.rel.RelNode |
---|
emptyArray |
Constructor Summary | |
---|---|
LcsIndexSearchRel(RelOptCluster cluster,
RelNode child,
LcsTable lcsTable,
FemLocalIndex index,
boolean fullScan,
Integer[] projectedColumns,
boolean isUniqueKey,
boolean isOuter,
boolean isVisibleInExplain,
Integer[] inputKeyProj,
Integer[] inputJoinProj,
Integer[] inputDirectiveProj,
FennelRelParamId startRidParamId,
FennelRelParamId rowLimitParamId,
Double indexSelectivity)
Creates a new LcsIndexSearchRel object. |
Method Summary | |
---|---|
LcsIndexSearchRel |
clone()
Clones this RelNode. |
LcsIndexSearchRel |
cloneWithNewParams(FennelRelParamId startRidParamId,
FennelRelParamId rowLimitParamId)
Create a new index search rel based on the existing one but with new dynamic parameters. |
(package private) RelOptCost |
computeCost(RelOptPlanner planner,
double dRows)
|
RelOptCost |
computeSelfCost(RelOptPlanner planner)
Returns the cost of this plan (not including children). |
protected RelDataType |
deriveRowType()
|
void |
explain(RelOptPlanWriter pw)
|
Double |
getIndexSelectivity()
|
Integer[] |
getInputDirectiveProj()
|
Integer[] |
getInputJoinProj()
|
int |
getInputKeyCount()
|
Integer[] |
getInputKeyProj()
|
LcsTable |
getLcsTable()
|
double |
getRows()
Returns an estimate of the number of rows this relational expression will return. |
RelOptTable |
getTable()
If this relational expression represents an access to a table, returns that table, otherwise returns null. |
boolean |
isInputSingleKeyset()
|
boolean |
isOuter()
|
boolean |
isUniqueKey()
|
boolean |
isVisibleInExplain()
|
FemExecutionStreamDef |
toStreamDef(FennelRelImplementor implementor)
Converts this relational expression to FemExecutionStreamDef
form. |
Methods inherited from class net.sf.farrago.fennel.rel.FennelOptionalRel |
---|
childrenAccept, getInputs, implementFennelChild |
Methods inherited from class net.sf.farrago.fennel.rel.FennelSingleRel |
---|
getCollations, getFarragoTypeFactory |
Methods inherited from class org.eigenbase.rel.SingleRel |
---|
getChild, replaceInput |
Methods inherited from class org.eigenbase.rel.AbstractRelNode |
---|
cloneTraits, collectVariablesSet, collectVariablesUsed, computeDigest, getChildExps, getCluster, getCollationList, getConvention, getCorrelVariable, getDescription, getDigest, getExpectedInputRowType, getId, getInput, getOrCreateCorrelVariable, getQuery, getRelTypeName, getRowType, getTraits, getVariablesStopped, inheritTraitsFrom, isAccessTo, isDistinct, isValid, onRegister, recomputeDigest, register, registerCorrelVariable, setCorrelVariable, toString |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.eigenbase.rel.RelNode |
---|
collectVariablesSet, collectVariablesUsed, getChildExps, getCluster, getCollationList, getConvention, getCorrelVariable, getDescription, getDigest, getExpectedInputRowType, getId, getInput, getOrCreateCorrelVariable, getQuery, getRelTypeName, getRowType, getTraits, getVariablesStopped, isAccessTo, isDistinct, isValid, onRegister, recomputeDigest, registerCorrelVariable, replaceInput, setCorrelVariable |
Field Detail |
---|
final FemLocalIndex index
final LcsTable lcsTable
final boolean fullScan
final Integer[] projectedColumns
final boolean isUniqueKey
final boolean isOuter
final boolean isVisibleInExplain
public final Double indexSelectivity
final Integer[] inputKeyProj
final Integer[] inputJoinProj
final Integer[] inputDirectiveProj
FennelRelParamId startRidParamId
FennelRelParamId rowLimitParamId
Constructor Detail |
---|
public LcsIndexSearchRel(RelOptCluster cluster, RelNode child, LcsTable lcsTable, FemLocalIndex index, boolean fullScan, Integer[] projectedColumns, boolean isUniqueKey, boolean isOuter, boolean isVisibleInExplain, Integer[] inputKeyProj, Integer[] inputJoinProj, Integer[] inputDirectiveProj, FennelRelParamId startRidParamId, FennelRelParamId rowLimitParamId, Double indexSelectivity)
cluster
- the environment for the scanchild
- input which produces keyslcsTable
- the table containing the indexfullScan
- whether to perform a full scanprojectedColumns
- the columns to be projected from an index scan.
If this parameter is null for a "key search", then the three bitmap
fields are projected. This parameter cannot be null for a "full scan".isUniqueKey
- for a search, whether keys are known to be uniqueisOuter
- for a search with join, whether nulls should be made up
for unmatched inputsisVisibleInExplain
- whether the relNode should appear in the
explain outputinputKeyProj
- for a double key search, the projection of input
fields to be used as search keysinputJoinProj
- for an index join, a projection of input fields to
be added to the outputinputDirectiveProj
- for a double key search, the projection of
input fields describing search endpoints, such as OPEN or CLOSEDstartRidParamId
- parameter ID for searching using start Rid as part
of the keyrowLimitParamId
- parameter ID to limit the number of rows fetched
in one executeindexSelectivity
- the selectivity of the index searchMethod Detail |
---|
public double getRows()
RelNode
NOTE jvs 29-Mar-2006: Don't call this method directly. Instead, use
RelMetadataQuery.getRowCount(org.eigenbase.rel.RelNode)
, which gives plugins a chance to
override the rel's default ideas about row count.
getRows
in interface RelNode
getRows
in class FennelOptionalRel
public LcsIndexSearchRel clone()
RelNode
Traits of the RelNode must be explicitly cloned, using AbstractRelNode.inheritTraitsFrom(AbstractRelNode)
, as the RelNode may
have traits of which it has no knowledge. Example implementation:
public MyRelNode clone() { MyRelNode clone = new MyRelNode(...); clone.inheritTraitsFrom(this); return clone; }N.B.: This method must be overridden whenever an existing, concrete RelNode is extended. Otherwise, calling clone() will produce a differently typed RelNode, resulting in invalid or incorrect query plans.
clone
in interface RelNode
clone
in class AbstractRelNode
public LcsIndexSearchRel cloneWithNewParams(FennelRelParamId startRidParamId, FennelRelParamId rowLimitParamId)
startRidParamId
- parameter ID for searching using start Rid as part
of the keyrowLimitParamId
- parameter ID to limit the number of rows fetched
in one execute
public RelOptCost computeSelfCost(RelOptPlanner planner)
RelNode
NOTE jvs 29-Mar-2006: Don't call this method directly. Instead, use
RelMetadataQuery.getNonCumulativeCost(org.eigenbase.rel.RelNode)
, which gives plugins a
chance to override the rel's default ideas about cost.
computeSelfCost
in interface RelNode
computeSelfCost
in class AbstractRelNode
RelOptCost computeCost(RelOptPlanner planner, double dRows)
protected RelDataType deriveRowType()
deriveRowType
in class SingleRel
public void explain(RelOptPlanWriter pw)
explain
in interface RelNode
explain
in class SingleRel
public FemExecutionStreamDef toStreamDef(FennelRelImplementor implementor)
FennelRel
FemExecutionStreamDef
form. In the process, the relational expression will almost certainly
call FennelRelImplementor.visitFennelChild(net.sf.farrago.query.FennelRel, int)
on each of its
children.
implementor
- for generating Java code
public RelOptTable getTable()
RelNode
getTable
in interface RelNode
getTable
in class AbstractRelNode
public boolean isUniqueKey()
public boolean isOuter()
public boolean isVisibleInExplain()
public Integer[] getInputKeyProj()
public Integer[] getInputJoinProj()
public Integer[] getInputDirectiveProj()
public boolean isInputSingleKeyset()
public int getInputKeyCount()
public LcsTable getLcsTable()
public Double getIndexSelectivity()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |