Class LogicalTableScan
- All Implemented Interfaces:
Cloneable
,RelOptNode
,Hintable
,RelNode
LogicalTableScan
reads all the rows from a
RelOptTable
.
If the table is a net.sf.saffron.ext.JdbcTable
, then this is
literally possible. But for other kinds of tables, there may be many ways to
read the data from the table. For some kinds of table, it may not even be
possible to read all of the rows unless some narrowing constraint is applied.
In the example of the net.sf.saffron.ext.ReflectSchema
schema,
select from fields
cannot be implemented, but
select from fields as f where f.getClass().getName().equals("java.lang.String")
can. It is the optimizer's responsibility to find these ways, by applying transformation rules.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.calcite.rel.RelNode
RelNode.Context
-
Field Summary
Fields inherited from class org.apache.calcite.rel.AbstractRelNode
digest, id, rowType, traitSet
-
Constructor Summary
ConstructorDescriptionLogicalTableScan
(RelOptCluster cluster, RelOptTable table) Deprecated.LogicalTableScan
(RelOptCluster cluster, RelTraitSet traitSet, List<RelHint> hints, RelOptTable table) Creates a LogicalTableScan.LogicalTableScan
(RelOptCluster cluster, RelTraitSet traitSet, RelOptTable table) Deprecated.LogicalTableScan
(RelInput input) Creates a LogicalTableScan by parsing serialized output. -
Method Summary
Modifier and TypeMethodDescriptioncopy
(RelTraitSet traitSet, List<RelNode> inputs) Creates a copy of this relational expression, perhaps changing traits and inputs.static LogicalTableScan
create
(RelOptCluster cluster, RelOptTable relOptTable, List<RelHint> hints) Creates a LogicalTableScan.Returns a new relational expression with the specified hintshintList
.Methods inherited from class org.apache.calcite.rel.core.TableScan
accept, computeSelfCost, deriveRowType, estimateRowCount, explainTerms, getHints, getTable, identity, identity, project
Methods inherited from class org.apache.calcite.rel.AbstractRelNode
accept, childrenAccept, collectVariablesSet, collectVariablesUsed, deepEquals, deepHashCode, equals, explain, getCluster, getConvention, getCorrelVariable, getDescription, getDigest, getExpectedInputRowType, getId, getInput, getInputs, getRelDigest, getRelTypeName, getRowType, getTraitSet, getVariablesSet, hashCode, isEnforcer, 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.hint.Hintable
attachHints
Methods inherited from interface org.apache.calcite.rel.RelNode
explain, fieldIsNullable, stripped
-
Constructor Details
-
LogicalTableScan
public LogicalTableScan(RelOptCluster cluster, RelTraitSet traitSet, List<RelHint> hints, RelOptTable table) Creates a LogicalTableScan.Use
create(org.apache.calcite.plan.RelOptCluster, org.apache.calcite.plan.RelOptTable, java.util.List<org.apache.calcite.rel.hint.RelHint>)
unless you know what you're doing. -
LogicalTableScan
Deprecated. -
LogicalTableScan
Deprecated. -
LogicalTableScan
Creates a LogicalTableScan by parsing serialized output.
-
-
Method Details
-
copy
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
-
create
public static LogicalTableScan create(RelOptCluster cluster, RelOptTable relOptTable, List<RelHint> hints) Creates a LogicalTableScan.- Parameters:
cluster
- ClusterrelOptTable
- Tablehints
- The hints
-
withHints
Description copied from interface:Hintable
Returns a new relational expression with the specified hintshintList
.This method should be overridden by every logical node that supports hint. It is only for internal use during decorrelation.
Sub-class should return a new copy of the relational expression.
The default implementation returns the relational expression directly only because not every kind of relational expression supports hints.
- Returns:
- Relational expression with set up hints
-