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| Modifier and Type | Field and Description |
|---|---|
protected 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 traits,
List<RelNode> inputs,
RexNode rexCall,
Type elementType,
RelDataType rowType,
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,
Type elementType,
RelDataType rowType,
Set<RelColumnMapping> columnMappings)
Copies this relational expression, substituting traits and
inputs.
|
RelWriter |
explainTerms(RelWriter pw)
Describes the inputs and attributes of this relational expression.
|
RexNode |
getCall()
Returns function invocation expression.
|
List<RexNode> |
getChildExps()
Returns a list of this relational expression's child expressions.
|
Set<RelColumnMapping> |
getColumnMappings()
Returns set of mappings known for this table function, or null if unknown
(not the same as empty!).
|
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.
|
double |
getRows()
Returns an estimate of the number of rows this relational expression will
return.
|
void |
replaceInput(int ordinalInParent,
RelNode p)
Replaces the
ordinalInParentth input. |
accept, childrenAccept, collectVariablesSet, collectVariablesUsed, computeDigest, computeSelfCost, deriveRowType, explain, getCluster, getCollationList, getConvention, getCorrelVariable, getDescription, getDigest, getExpectedInputRowType, getId, getInput, getQuery, getRelTypeName, getRowType, getTable, getTraitSet, getVariablesStopped, isDistinct, isKey, isValid, metadata, onRegister, recomputeDigest, register, sole, toStringprotected final com.google.common.collect.ImmutableSet<RelColumnMapping> columnMappings
protected TableFunctionScan(RelOptCluster cluster, RelTraitSet traits, List<RelNode> inputs, RexNode rexCall, Type elementType, RelDataType rowType, Set<RelColumnMapping> columnMappings)
TableFunctionScan.cluster - Cluster that this relational expression belongs toinputs - 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 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, Type elementType, RelDataType rowType, 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 List<RexNode> getChildExps()
RelNodeRelNode.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 RelNodegetChildExps in class AbstractRelNodeRelNode.accept(org.apache.calcite.rex.RexShuttle)public 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 getRows()
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.
getRows in interface RelNodegetRows in class AbstractRelNodepublic 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
RelWriterImpl.input(String, RelNode)
and
RelWriterImpl.item(String, Object)
methods for each input and attribute.explainTerms in class AbstractRelNodepw - Plan writerpublic Set<RelColumnMapping> getColumnMappings()
public Type getElementType()
Copyright © 2012–2015 The Apache Software Foundation. All rights reserved.