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.
LogicalTableFunctionScan
RelNode.Context
Modifier and Type | Field and Description |
---|---|
protected com.google.common.collect.ImmutableSet<RelColumnMapping> |
columnMappings |
private java.lang.reflect.Type |
elementType |
private com.google.common.collect.ImmutableList<RelNode> |
inputs |
private RexNode |
rexCall |
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,
java.util.List<RelNode> inputs,
RexNode rexCall,
java.lang.reflect.Type elementType,
RelDataType rowType,
java.util.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,
java.util.List<RelNode> inputs)
Creates a copy of this relational expression, perhaps changing traits and
inputs.
|
abstract TableFunctionScan |
copy(RelTraitSet traitSet,
java.util.List<RelNode> inputs,
RexNode rexCall,
java.lang.reflect.Type elementType,
RelDataType rowType,
java.util.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.
|
java.util.List<RexNode> |
getChildExps()
Returns a list of this relational expression's child expressions.
|
java.util.Set<RelColumnMapping> |
getColumnMappings()
Returns set of mappings known for this table function, or null if unknown
(not the same as empty!).
|
java.lang.reflect.Type |
getElementType()
Returns element type of the collection that will implement this table.
|
java.util.List<RelNode> |
getInputs()
Returns an array of this relational expression's inputs.
|
void |
replaceInput(int ordinalInParent,
RelNode p)
Replaces the
ordinalInParent th input. |
accept, childrenAccept, collectVariablesSet, collectVariablesUsed, computeDigest, computeSelfCost, computeSelfCost, deriveRowType, explain, getCluster, getCollationList, getConvention, getCorrelVariable, getDescription, getDigest, getExpectedInputRowType, getId, getInput, getQuery, getRelTypeName, getRows, getRowType, getTable, getTraitSet, getVariablesSet, getVariablesStopped, isDistinct, isKey, isValid, isValid, metadata, onRegister, recomputeDigest, register, sole, toString
private final RexNode rexCall
private final java.lang.reflect.Type elementType
private com.google.common.collect.ImmutableList<RelNode> inputs
protected final com.google.common.collect.ImmutableSet<RelColumnMapping> columnMappings
protected TableFunctionScan(RelOptCluster cluster, RelTraitSet traitSet, java.util.List<RelNode> inputs, RexNode rexCall, java.lang.reflect.Type elementType, RelDataType rowType, java.util.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, java.util.List<RelNode> inputs)
RelNode
Sub-classes with other important attributes are encouraged to create variants of this method with more parameters.
copy
in interface RelNode
copy
in class AbstractRelNode
traitSet
- Trait setinputs
- Inputspublic abstract TableFunctionScan copy(RelTraitSet traitSet, java.util.List<RelNode> inputs, RexNode rexCall, java.lang.reflect.Type elementType, RelDataType rowType, java.util.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 java.util.List<RelNode> getInputs()
RelNode
null
.getInputs
in interface RelOptNode
getInputs
in interface RelNode
getInputs
in class AbstractRelNode
public java.util.List<RexNode> getChildExps()
RelNode
RelNode.getInputs()
.
The caller should treat the list as unmodifiable; typical
implementations will return an immutable list. If there are no
child expressions, returns an empty list, not null
.
getChildExps
in interface RelNode
getChildExps
in class AbstractRelNode
RelNode.accept(org.apache.calcite.rex.RexShuttle)
public RelNode accept(RexShuttle shuttle)
RelNode
accept
in interface RelNode
accept
in class AbstractRelNode
shuttle
- Shuttlepublic void replaceInput(int ordinalInParent, RelNode p)
RelNode
ordinalInParent
th input. You must
override this method if you override RelNode.getInputs()
.replaceInput
in interface RelNode
replaceInput
in class AbstractRelNode
ordinalInParent
- Position of the child input, 0 is the firstp
- New node that should be put at position ordinalInParent
public double estimateRowCount(RelMetadataQuery mq)
RelNode
NOTE 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 RelNode
estimateRowCount
in class AbstractRelNode
mq
- Metadata querypublic RexNode getCall()
Within this rexCall, instances of
RexInputRef
refer to entire input
RelNode
s rather than their fields.
public RelWriter explainTerms(RelWriter pw)
AbstractRelNode
super.explainTerms
, then call the
RelWriter.input(String, RelNode)
and
RelWriterImpl.item(String, Object)
methods for each input and attribute.explainTerms
in class AbstractRelNode
pw
- Plan writerpublic java.util.Set<RelColumnMapping> getColumnMappings()
public java.lang.reflect.Type getElementType()
Copyright © 2012–2019 The Apache Software Foundation. All rights reserved.