public final class LogicalTableScan extends TableScan
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.
RelNode.Context
digest, id, rowType, traitSet
Constructor and Description |
---|
LogicalTableScan(RelInput input)
Creates a LogicalTableScan by parsing serialized output.
|
LogicalTableScan(RelOptCluster cluster,
RelOptTable table)
Deprecated.
|
LogicalTableScan(RelOptCluster cluster,
RelTraitSet traitSet,
RelOptTable table)
Creates a LogicalTableScan.
|
Modifier and Type | Method and 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.
|
accept, computeSelfCost, deriveRowType, estimateRowCount, explainTerms, getCollationList, getTable, identity, identity, project
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
public LogicalTableScan(RelOptCluster cluster, RelTraitSet traitSet, RelOptTable table)
Use create(org.apache.calcite.plan.RelOptCluster, org.apache.calcite.plan.RelOptTable)
unless you know what you're doing.
@Deprecated public LogicalTableScan(RelOptCluster cluster, RelOptTable table)
public LogicalTableScan(RelInput input)
public RelNode 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 static LogicalTableScan create(RelOptCluster cluster, RelOptTable relOptTable)
cluster
- ClusterrelOptTable
- TableCopyright © 2012–2019 The Apache Software Foundation. All rights reserved.