Package org.apache.calcite.rel.logical
Class LogicalTableScan
- java.lang.Object
-
- org.apache.calcite.rel.AbstractRelNode
-
- org.apache.calcite.rel.core.TableScan
-
- org.apache.calcite.rel.logical.LogicalTableScan
-
- All Implemented Interfaces:
java.lang.Cloneable
,RelOptNode
,RelNode
public final class LogicalTableScan extends TableScan
ALogicalTableScan
reads all the rows from aRelOptTable
.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
-
-
Constructor Summary
Constructors Constructor Description LogicalTableScan(RelOptCluster cluster, RelOptTable table)
Deprecated.LogicalTableScan(RelOptCluster cluster, RelTraitSet traitSet, RelOptTable table)
Creates a LogicalTableScan.LogicalTableScan(RelInput input)
Creates a LogicalTableScan by parsing serialized output.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description RelNode
copy(RelTraitSet traitSet, java.util.List<RelNode> inputs)
Creates a copy of this relational expression, perhaps changing traits and inputs.static LogicalTableScan
create(RelOptCluster cluster, RelOptTable relOptTable)
Creates a LogicalTableScan.-
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
-
-
-
-
Constructor Detail
-
LogicalTableScan
public LogicalTableScan(RelOptCluster cluster, RelTraitSet traitSet, RelOptTable table)
Creates a LogicalTableScan.Use
create(org.apache.calcite.plan.RelOptCluster, org.apache.calcite.plan.RelOptTable)
unless you know what you're doing.
-
LogicalTableScan
@Deprecated public LogicalTableScan(RelOptCluster cluster, RelOptTable table)
Deprecated.
-
LogicalTableScan
public LogicalTableScan(RelInput input)
Creates a LogicalTableScan by parsing serialized output.
-
-
Method Detail
-
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
-
create
public static LogicalTableScan create(RelOptCluster cluster, RelOptTable relOptTable)
Creates a LogicalTableScan.- Parameters:
cluster
- ClusterrelOptTable
- Table
-
-