|
|||||||||
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 org.eigenbase.rel.TableModificationRelBase net.sf.farrago.namespace.impl.MedAbstractFennelTableModRel com.lucidera.lcs.LcsTableMergeRel
public class LcsTableMergeRel
LcsTableMergeRel is the relational expression corresponding to merges on a column-store table.
Nested Class Summary | |
---|---|
(package private) static class |
LcsTableMergeRel.ReshapeProjectionType
|
Nested classes/interfaces inherited from class org.eigenbase.rel.TableModificationRelBase |
---|
TableModificationRelBase.Operation |
Field Summary | |
---|---|
private Double |
estimatedNumRows
|
private boolean |
insertOnly
|
(package private) LcsTable |
lcsTable
|
private List<FemLocalIndex> |
updateClusters
|
private boolean |
updateOnly
|
Fields inherited from class org.eigenbase.rel.TableModificationRelBase |
---|
connection, table |
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 | |
---|---|
LcsTableMergeRel(RelOptCluster cluster,
LcsTable lcsTable,
RelOptConnection connection,
RelNode child,
TableModificationRelBase.Operation operation,
List<String> updateColumnList,
boolean updateOnly,
List<FemLocalIndex> updateClusters)
Constructor. |
Method Summary | |
---|---|
LcsTableMergeRel |
clone()
Clones this RelNode. |
RelOptCost |
computeSelfCost(RelOptPlanner planner)
Returns the cost of this plan (not including children). |
private FemLbmSplicerStreamDef |
createDeleteStream(FarragoRepos repos,
FennelRelImplementor implementor,
LcsIndexGuide indexGuide,
LcsAppendStreamDef appendStreamDef,
FennelRel childFennelRel,
FemSplitterStreamDef splitter,
int writeRowCountParamId)
Creates the substream for deleting rows for the MERGE statement |
private FemReshapeStreamDef |
createMergeReshape(boolean compareRid,
CompOperator compOp,
LcsTableMergeRel.ReshapeProjectionType projType,
FennelRel input)
Creates a Reshape execution stream used within the MERGE execution stream that optionally compares the rid column in its input to either null or non-null. |
private RelDataType |
createRidRowType(boolean nullableRid)
Creates a rowtype corresponding to a single rid column |
private FemSortingStreamDef |
createRidSort(FennelRel sourceInput)
Creates a sort stream that sorts on the first column in the input, which corresponds to a rid column. |
private FemMergeStreamDef |
createRidSplitterStream(FennelRelImplementor implementor,
LcsIndexGuide indexGuide,
FennelRel childFennelRel,
FemExecutionStreamDef sourceStream)
Creates a substream that takes a input containing rid values. |
void |
explain(RelOptPlanWriter pw)
|
RelDataType |
getExpectedInputRowType(int ordinalInParent)
Returns the type of the rows expected for an input. |
LcsTable |
getLcsTable()
|
List<FemLocalIndex> |
getUpdateClusters()
|
boolean |
getUpdateOnly()
|
FemExecutionStreamDef |
toStreamDef(FennelRelImplementor implementor)
Converts this relational expression to FemExecutionStreamDef
form. |
Methods inherited from class net.sf.farrago.namespace.impl.MedAbstractFennelTableModRel |
---|
getCollations, getConnection, getFarragoTypeFactory, implementFennelChild, inputNeedBuffer, inputNeedBuffer, newInputBuffer |
Methods inherited from class org.eigenbase.rel.TableModificationRelBase |
---|
deriveRowType, getOperation, getTable, getUpdateColumnList, isDelete, isFlattened, isInsert, isMerge, isUpdate |
Methods inherited from class org.eigenbase.rel.SingleRel |
---|
childrenAccept, getChild, getInputs, getRows, replaceInput |
Methods inherited from class org.eigenbase.rel.AbstractRelNode |
---|
cloneTraits, collectVariablesSet, collectVariablesUsed, computeDigest, getChildExps, getCluster, getCollationList, getConvention, getCorrelVariable, getDescription, getDigest, 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 |
---|
childrenAccept, collectVariablesSet, collectVariablesUsed, getChildExps, getCluster, getCollationList, getConvention, getCorrelVariable, getDescription, getDigest, getId, getInput, getInputs, getOrCreateCorrelVariable, getQuery, getRelTypeName, getRows, getRowType, getTable, getTraits, getVariablesStopped, isAccessTo, isDistinct, isValid, onRegister, recomputeDigest, registerCorrelVariable, replaceInput, setCorrelVariable |
Field Detail |
---|
private boolean updateOnly
private List<FemLocalIndex> updateClusters
private boolean insertOnly
private Double estimatedNumRows
final LcsTable lcsTable
Constructor Detail |
---|
public LcsTableMergeRel(RelOptCluster cluster, LcsTable lcsTable, RelOptConnection connection, RelNode child, TableModificationRelBase.Operation operation, List<String> updateColumnList, boolean updateOnly, List<FemLocalIndex> updateClusters)
cluster
- RelOptCluster for this rellcsTable
- target table of mergeconnection
- connectionchild
- input to the mergeoperation
- DML operation typeupdateColumnList
- update column list in the update substatementupdateOnly
- merge only consists of an update substatementupdateClusters
- if the merge executes by replacing the columns
being updated as opposed to updating entire rows, then this is set to the
list of clusters that will be replaced; otherwise, nullMethod Detail |
---|
public LcsTable getLcsTable()
public boolean getUpdateOnly()
public List<FemLocalIndex> getUpdateClusters()
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 TableModificationRelBase
public LcsTableMergeRel 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 void explain(RelOptPlanWriter pw)
explain
in interface RelNode
explain
in class TableModificationRelBase
public RelDataType getExpectedInputRowType(int ordinalInParent)
RelNode
RelNode.getRowType()
.
getExpectedInputRowType
in interface RelNode
getExpectedInputRowType
in class TableModificationRelBase
ordinalInParent
- input's 0-based ordinal with respect to this
parent rel
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
private FemMergeStreamDef createRidSplitterStream(FennelRelImplementor implementor, LcsIndexGuide indexGuide, FennelRel childFennelRel, FemExecutionStreamDef sourceStream)
implementor
- FennelRel implementorindexGuide
- index guidechildFennelRel
- FennelRel corresponding to the source input for the
MERGEsourceStream
- the stream def corresponding to the input into the
substream to be created
private FemSortingStreamDef createRidSort(FennelRel sourceInput)
private FemReshapeStreamDef createMergeReshape(boolean compareRid, CompOperator compOp, LcsTableMergeRel.ReshapeProjectionType projType, FennelRel input)
compareRid
- true if the stream will be doing rid comparisoncompOp
- the operator to use in the rid comparisonprojType
- the type of projection to be done (either project only
the rid column, the non-null rid columns, or all columns)input
- FennelRel corresponding to the input that will be reshaped
private RelDataType createRidRowType(boolean nullableRid)
nullableRid
- if true, create the rid type column as nullable
private FemLbmSplicerStreamDef createDeleteStream(FarragoRepos repos, FennelRelImplementor implementor, LcsIndexGuide indexGuide, LcsAppendStreamDef appendStreamDef, FennelRel childFennelRel, FemSplitterStreamDef splitter, int writeRowCountParamId)
repos
- repositoryimplementor
- FennelRel implementorindexGuide
- index guideappendStreamDef
- the append stream that this delete stream is
associated withchildFennelRel
- FennelRel corresponding to the source input for the
MERGEsplitter
- the splitter producer that passes rows to the delete
substreamwriteRowCountParamId
- parameter id that the splicer stream will use
to write out its rowcount to be read by a downstream barrier
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |