public abstract class TableFunctionScan extends AbstractRelNode
The function returns a result set. It can appear as a leaf in a query tree, or can be applied to relational inputs.
LogicalTableFunctionScanRelNode.Context| Modifier and Type | Field and Description |
|---|---|
protected @Nullable com.google.common.collect.ImmutableSet<RelColumnMapping> |
columnMappings |
digest, id, rowType, traitSet| Modifier | Constructor and Description |
|---|---|
protected |
TableFunctionScan(RelInput input)
Creates a TableFunctionScan by parsing serialized output.
|
protected |
TableFunctionScan(RelOptCluster cluster,
RelTraitSet traitSet,
List<RelNode> inputs,
RexNode rexCall,
@Nullable Type elementType,
RelDataType rowType,
@Nullable Set<RelColumnMapping> columnMappings)
Creates a
TableFunctionScan. |
| Modifier and Type | Method and Description |
|---|---|
RelNode |
accept(RexShuttle shuttle)
Accepts a visit from a shuttle.
|
TableFunctionScan |
copy(RelTraitSet traitSet,
List<RelNode> inputs)
Creates a copy of this relational expression, perhaps changing traits and
inputs.
|
abstract TableFunctionScan |
copy(RelTraitSet traitSet,
List<RelNode> inputs,
RexNode rexCall,
@Nullable Type elementType,
RelDataType rowType,
@Nullable Set<RelColumnMapping> columnMappings)
Copies this relational expression, substituting traits and
inputs.
|
double |
estimateRowCount(RelMetadataQuery mq)
Returns an estimate of the number of rows this relational expression will
return.
|
RelWriter |
explainTerms(RelWriter pw)
Describes the inputs and attributes of this relational expression.
|
RexNode |
getCall()
Returns function invocation expression.
|
@Nullable Set<RelColumnMapping> |
getColumnMappings()
Returns set of mappings known for this table function, or null if unknown
(not the same as empty!).
|
@Nullable Type |
getElementType()
Returns element type of the collection that will implement this table.
|
List<RelNode> |
getInputs()
Returns an array of this relational expression's inputs.
|
void |
replaceInput(int ordinalInParent,
RelNode p)
Replaces the
ordinalInParentth input. |
accept, childrenAccept, collectVariablesSet, collectVariablesUsed, computeSelfCost, deepEquals, deepHashCode, deriveRowType, equals, explain, getCluster, getConvention, getCorrelVariable, getDescription, getDigest, getExpectedInputRowType, getId, getInput, getRelDigest, getRelTypeName, getRowType, getTable, getTraitSet, getVariablesSet, hashCode, isEnforcer, isValid, metadata, onRegister, recomputeDigest, register, sole, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitexplain, fieldIsNullableprotected final @Nullable com.google.common.collect.ImmutableSet<RelColumnMapping> columnMappings
protected TableFunctionScan(RelOptCluster cluster, RelTraitSet traitSet, List<RelNode> inputs, RexNode rexCall, @Nullable Type elementType, RelDataType rowType, @Nullable Set<RelColumnMapping> columnMappings)
TableFunctionScan.cluster - Cluster that this relational expression belongs toinputs - 0 or more relational inputstraitSet - Trait setrexCall - Function invocation expressionelementType - Element type of the collection that will implement
this tablerowType - Row type produced by functioncolumnMappings - Column mappings associated with this functionprotected TableFunctionScan(RelInput input)
public final TableFunctionScan copy(RelTraitSet traitSet, List<RelNode> inputs)
RelNodeSub-classes with other important attributes are encouraged to create variants of this method with more parameters.
copy in interface RelNodecopy in class AbstractRelNodetraitSet - Trait setinputs - Inputspublic abstract TableFunctionScan copy(RelTraitSet traitSet, List<RelNode> inputs, RexNode rexCall, @Nullable Type elementType, RelDataType rowType, @Nullable Set<RelColumnMapping> columnMappings)
traitSet - Traitsinputs - 0 or more relational inputsrexCall - Function invocation expressionelementType - Element type of the collection that will implement
this tablerowType - Row type produced by functioncolumnMappings - Column mappings associated with this functionpublic List<RelNode> getInputs()
RelNodenull.getInputs in interface RelOptNodegetInputs in interface RelNodegetInputs in class AbstractRelNodepublic RelNode accept(RexShuttle shuttle)
RelNodeaccept in interface RelNodeaccept in class AbstractRelNodeshuttle - Shuttlepublic void replaceInput(int ordinalInParent,
RelNode p)
RelNodeordinalInParentth input. You must
override this method if you override RelNode.getInputs().replaceInput in interface RelNodereplaceInput in class AbstractRelNodeordinalInParent - Position of the child input, 0 is the firstp - New node that should be put at position ordinalInParentpublic double estimateRowCount(RelMetadataQuery mq)
RelNodeNOTE jvs 29-Mar-2006: Don't call this method directly. Instead, use
RelMetadataQuery.getRowCount(org.apache.calcite.rel.RelNode), which gives plugins a chance to
override the rel's default ideas about row count.
estimateRowCount in interface RelNodeestimateRowCount in class AbstractRelNodemq - Metadata querypublic RexNode getCall()
Within this rexCall, instances of
RexInputRef refer to entire input
RelNodes rather than their fields.
public RelWriter explainTerms(RelWriter pw)
AbstractRelNodesuper.explainTerms, then call the
RelWriter.input(String, RelNode)
and
RelWriter.item(String, Object)
methods for each input and attribute.explainTerms in class AbstractRelNodepw - Plan writerpublic @Nullable Set<RelColumnMapping> getColumnMappings()
public @Nullable Type getElementType()
Copyright © 2012-2022 Apache Software Foundation. All Rights Reserved.