public class TopNPrel extends SinglePrel implements OrderedRel, Prel
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.calcite.rel.RelCollation |
collation |
protected int |
limit |
DRILL_PHYSICAL| Constructor and Description |
|---|
TopNPrel(org.apache.calcite.plan.RelOptCluster cluster,
org.apache.calcite.plan.RelTraitSet traitSet,
org.apache.calcite.rel.RelNode child,
int limit,
org.apache.calcite.rel.RelCollation collation) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canBeDropped()
A method to return if this relational node can be dropped during optimization process.
|
org.apache.calcite.plan.RelOptCost |
computeSelfCost(org.apache.calcite.plan.RelOptPlanner planner,
org.apache.calcite.rel.metadata.RelMetadataQuery mq)
Cost of doing Top-N is proportional to M log N where M is the total number of
input rows and N is the limit for Top-N.
|
org.apache.calcite.rel.RelNode |
copy(org.apache.calcite.plan.RelTraitSet traitSet,
List<org.apache.calcite.rel.RelNode> inputs) |
org.apache.calcite.rel.RelWriter |
explainTerms(org.apache.calcite.rel.RelWriter pw) |
org.apache.calcite.rel.RelCollation |
getCollation()
A method to return ordering columns of the result.
|
BatchSchema.SelectionVectorMode |
getEncoding()
A Prel's own SelectionVector mode - i.e whether it generates an SV2, SV4 or None
|
org.apache.calcite.rex.RexNode |
getFetch()
Fetch value represented in RexNode.
|
int |
getLimit() |
org.apache.calcite.rex.RexNode |
getOffset()
Offset value represented in RexNode.
|
PhysicalOperator |
getPhysicalOperator(PhysicalPlanCreator creator) |
BatchSchema.SelectionVectorMode[] |
getSupportedEncodings()
Supported 'encodings' of a Prel indicates what are the acceptable modes of SelectionVector
of its child Prel
|
Prel |
prepareForLateralUnnestPipeline(List<org.apache.calcite.rel.RelNode> children)
If the operator is in Lateral/Unnest pipeline, then it generates a new operator which knows how to process
the rows accordingly during execution.
|
accept, iterator, needsFinalColumnReorderingchildrenAccept, deriveRowType, estimateRowCount, getInput, getInputs, replaceInputaccept, accept, collectVariablesSet, collectVariablesUsed, computeDigest, computeSelfCost, equals, explain, getChildExps, getCluster, getCollationList, getConvention, getCorrelVariable, getDescription, getDigest, getExpectedInputRowType, getId, getInput, getQuery, getRelTypeName, getRows, getRowType, getTable, getTraitSet, getVariablesSet, getVariablesStopped, hashCode, isDistinct, isKey, isValid, isValid, metadata, onRegister, recomputeDigest, register, sole, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitaccept, needsFinalColumnReorderingaccept, accept, childrenAccept, collectVariablesSet, collectVariablesUsed, computeSelfCost, estimateRowCount, explain, getChildExps, getCollationList, getConvention, getCorrelVariable, getExpectedInputRowType, getInput, getInputs, getQuery, getRelTypeName, getRows, getRowType, getTable, getVariablesSet, getVariablesStopped, isDistinct, isKey, isValid, isValid, metadata, onRegister, recomputeDigest, register, replaceInputgetCluster, getDescription, getDigest, getId, getTraitSetforEach, iterator, spliteratorprotected int limit
protected final org.apache.calcite.rel.RelCollation collation
public TopNPrel(org.apache.calcite.plan.RelOptCluster cluster,
org.apache.calcite.plan.RelTraitSet traitSet,
org.apache.calcite.rel.RelNode child,
int limit,
org.apache.calcite.rel.RelCollation collation)
public org.apache.calcite.rel.RelNode copy(org.apache.calcite.plan.RelTraitSet traitSet,
List<org.apache.calcite.rel.RelNode> inputs)
copy in interface org.apache.calcite.rel.RelNodecopy in class org.apache.calcite.rel.AbstractRelNodepublic PhysicalOperator getPhysicalOperator(PhysicalPlanCreator creator) throws IOException
getPhysicalOperator in interface PrelIOExceptionpublic org.apache.calcite.rel.RelCollation getCollation()
OrderedRelgetCollation in interface OrderedRelpublic org.apache.calcite.rex.RexNode getOffset()
OrderedRelgetOffset in interface OrderedRelpublic org.apache.calcite.rex.RexNode getFetch()
OrderedRelgetFetch in interface OrderedRelpublic boolean canBeDropped()
OrderedRelcanBeDropped in interface OrderedRelpublic org.apache.calcite.plan.RelOptCost computeSelfCost(org.apache.calcite.plan.RelOptPlanner planner,
org.apache.calcite.rel.metadata.RelMetadataQuery mq)
computeSelfCost in interface org.apache.calcite.rel.RelNodecomputeSelfCost in class org.apache.calcite.rel.AbstractRelNodepublic org.apache.calcite.rel.RelWriter explainTerms(org.apache.calcite.rel.RelWriter pw)
explainTerms in class org.apache.calcite.rel.SingleRelpublic int getLimit()
public BatchSchema.SelectionVectorMode[] getSupportedEncodings()
PrelgetSupportedEncodings in interface PrelgetSupportedEncodings in class SinglePrelpublic BatchSchema.SelectionVectorMode getEncoding()
PrelgetEncoding in interface Prelpublic Prel prepareForLateralUnnestPipeline(List<org.apache.calcite.rel.RelNode> children)
PrelprepareForLateralUnnestPipeline in interface PrelCopyright © 2021 The Apache Software Foundation. All rights reserved.