Class EnumerableTableScan
- java.lang.Object
-
- org.apache.calcite.rel.AbstractRelNode
-
- org.apache.calcite.rel.core.TableScan
-
- org.apache.calcite.adapter.enumerable.EnumerableTableScan
-
- All Implemented Interfaces:
java.lang.Cloneable
,EnumerableRel
,RelOptNode
,RelNode
public class EnumerableTableScan extends TableScan implements EnumerableRel
Implementation ofTableScan
inenumerable calling convention
.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.calcite.adapter.enumerable.EnumerableRel
EnumerableRel.Prefer, EnumerableRel.Result
-
Nested classes/interfaces inherited from interface org.apache.calcite.rel.RelNode
RelNode.Context
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Class
elementType
-
Fields inherited from class org.apache.calcite.rel.AbstractRelNode
digest, id, rowType, traitSet
-
Fields inherited from interface org.apache.calcite.adapter.enumerable.EnumerableRel
FILTER_FACTORY, PROJECT_FACTORY
-
-
Constructor Summary
Constructors Constructor Description EnumerableTableScan(RelOptCluster cluster, RelTraitSet traitSet, RelOptTable table, java.lang.Class elementType)
Creates an EnumerableTableScan.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static boolean
canHandle(Table table)
Returns whether EnumerableTableScan can generate code to handle a particular variant of the Table SPI.RelNode
copy(RelTraitSet traitSet, java.util.List<RelNode> inputs)
Creates a copy of this relational expression, perhaps changing traits and inputs.static EnumerableTableScan
create(RelOptCluster cluster, RelOptTable relOptTable)
Creates an EnumerableTableScan.static java.lang.Class
deduceElementType(Table table)
static JavaRowFormat
deduceFormat(RelOptTable table)
boolean
equals(java.lang.Object obj)
private Expression
fieldExpression(ParameterExpression row_, int i, PhysType physType, JavaRowFormat format)
private JavaRowFormat
format()
private Expression
getExpression(PhysType physType)
private boolean
hasCollectionField(RelDataType rowType)
int
hashCode()
EnumerableRel.Result
implement(EnumerableRelImplementor implementor, EnumerableRel.Prefer pref)
Creates a plan for this expression according to a calling convention.private Expression
toEnumerable(Expression expression)
private Expression
toRows(PhysType physType, Expression expression)
-
Methods inherited from class org.apache.calcite.rel.core.TableScan
accept, computeSelfCost, deriveRowType, estimateRowCount, explainTerms, getCollationList, getTable, identity, identity, project
-
Methods inherited from class org.apache.calcite.rel.AbstractRelNode
accept, childrenAccept, collectVariablesSet, collectVariablesUsed, computeDigest, computeSelfCost, explain, getChildExps, getCluster, getConvention, getCorrelVariable, getDescription, getDigest, getExpectedInputRowType, getId, getInput, getInputs, getQuery, getRelTypeName, getRows, getRowType, getTraitSet, getVariablesSet, getVariablesStopped, isDistinct, isKey, isValid, isValid, metadata, onRegister, recomputeDigest, register, replaceInput, sole, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.calcite.rel.RelNode
accept, accept, childrenAccept, collectVariablesSet, collectVariablesUsed, computeSelfCost, 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, replaceInput
-
Methods inherited from interface org.apache.calcite.plan.RelOptNode
getCluster, getDescription, getDigest, getId, getTraitSet
-
-
-
-
Constructor Detail
-
EnumerableTableScan
public EnumerableTableScan(RelOptCluster cluster, RelTraitSet traitSet, RelOptTable table, java.lang.Class elementType)
Creates an EnumerableTableScan.Use
create(org.apache.calcite.plan.RelOptCluster, org.apache.calcite.plan.RelOptTable)
unless you know what you are doing.
-
-
Method Detail
-
create
public static EnumerableTableScan create(RelOptCluster cluster, RelOptTable relOptTable)
Creates an EnumerableTableScan.
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
canHandle
public static boolean canHandle(Table table)
Returns whether EnumerableTableScan can generate code to handle a particular variant of the Table SPI.
-
deduceElementType
public static java.lang.Class deduceElementType(Table table)
-
deduceFormat
public static JavaRowFormat deduceFormat(RelOptTable table)
-
getExpression
private Expression getExpression(PhysType physType)
-
toEnumerable
private Expression toEnumerable(Expression expression)
-
toRows
private Expression toRows(PhysType physType, Expression expression)
-
fieldExpression
private Expression fieldExpression(ParameterExpression row_, int i, PhysType physType, JavaRowFormat format)
-
format
private JavaRowFormat format()
-
hasCollectionField
private boolean hasCollectionField(RelDataType rowType)
-
copy
public RelNode copy(RelTraitSet traitSet, java.util.List<RelNode> inputs)
Description copied from interface:RelNode
Creates a copy of this relational expression, perhaps changing traits and inputs.Sub-classes with other important attributes are encouraged to create variants of this method with more parameters.
- Specified by:
copy
in interfaceRelNode
- Overrides:
copy
in classAbstractRelNode
- Parameters:
traitSet
- Trait setinputs
- Inputs- Returns:
- Copy of this relational expression, substituting traits and inputs
-
implement
public EnumerableRel.Result implement(EnumerableRelImplementor implementor, EnumerableRel.Prefer pref)
Description copied from interface:EnumerableRel
Creates a plan for this expression according to a calling convention.- Specified by:
implement
in interfaceEnumerableRel
- Parameters:
implementor
- Implementorpref
- Preferred representation for rows in result expression- Returns:
- Plan for this expression according to a calling convention
-
-