Class LogicalTableScan
- All Implemented Interfaces:
Cloneable,org.apache.calcite.plan.RelOptNode,org.apache.calcite.rel.hint.Hintable,org.apache.calcite.rel.RelNode
LogicalTableScan reads all the rows from a RelOptTable.
This class is copied from Calcite because the explainTerms(org.apache.calcite.rel.RelWriter) should consider hints.
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
org.apache.calcite.rel.RelNode.Context -
Field Summary
Fields inherited from class org.apache.calcite.rel.core.TableScan
hints, tableFields inherited from class org.apache.calcite.rel.AbstractRelNode
digest, id, rowType, traitSet -
Constructor Summary
ConstructorsConstructorDescriptionLogicalTableScan(org.apache.calcite.plan.RelOptCluster cluster, org.apache.calcite.plan.RelOptTable table) Deprecated.LogicalTableScan(org.apache.calcite.plan.RelOptCluster cluster, org.apache.calcite.plan.RelTraitSet traitSet, List<org.apache.calcite.rel.hint.RelHint> hints, org.apache.calcite.plan.RelOptTable table) Creates a LogicalTableScan.LogicalTableScan(org.apache.calcite.plan.RelOptCluster cluster, org.apache.calcite.plan.RelTraitSet traitSet, org.apache.calcite.plan.RelOptTable table) Deprecated.LogicalTableScan(org.apache.calcite.rel.RelInput input) Creates a LogicalTableScan by parsing serialized output. -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.calcite.rel.RelNodestatic LogicalTableScancreate(org.apache.calcite.plan.RelOptCluster cluster, org.apache.calcite.plan.RelOptTable relOptTable, List<org.apache.calcite.rel.hint.RelHint> hints) Creates a LogicalTableScan.org.apache.calcite.rel.RelWriterexplainTerms(org.apache.calcite.rel.RelWriter pw) org.apache.calcite.rel.RelNodeMethods inherited from class org.apache.calcite.rel.core.TableScan
accept, computeSelfCost, deriveRowType, estimateRowCount, getHints, getTable, identity, identity, projectMethods 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, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.calcite.rel.hint.Hintable
attachHintsMethods inherited from interface org.apache.calcite.rel.RelNode
explain, fieldIsNullable
-
Constructor Details
-
LogicalTableScan
public LogicalTableScan(org.apache.calcite.plan.RelOptCluster cluster, org.apache.calcite.plan.RelTraitSet traitSet, List<org.apache.calcite.rel.hint.RelHint> hints, org.apache.calcite.plan.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 public LogicalTableScan(org.apache.calcite.plan.RelOptCluster cluster, org.apache.calcite.plan.RelTraitSet traitSet, org.apache.calcite.plan.RelOptTable table) Deprecated. -
LogicalTableScan
@Deprecated public LogicalTableScan(org.apache.calcite.plan.RelOptCluster cluster, org.apache.calcite.plan.RelOptTable table) Deprecated. -
LogicalTableScan
public LogicalTableScan(org.apache.calcite.rel.RelInput input) Creates a LogicalTableScan by parsing serialized output.
-
-
Method Details
-
copy
public org.apache.calcite.rel.RelNode copy(org.apache.calcite.plan.RelTraitSet traitSet, List<org.apache.calcite.rel.RelNode> inputs) - Specified by:
copyin interfaceorg.apache.calcite.rel.RelNode- Overrides:
copyin classorg.apache.calcite.rel.AbstractRelNode
-
explainTerms
public org.apache.calcite.rel.RelWriter explainTerms(org.apache.calcite.rel.RelWriter pw) - Overrides:
explainTermsin classorg.apache.calcite.rel.core.TableScan
-
create
public static LogicalTableScan create(org.apache.calcite.plan.RelOptCluster cluster, org.apache.calcite.plan.RelOptTable relOptTable, List<org.apache.calcite.rel.hint.RelHint> hints) Creates a LogicalTableScan.- Parameters:
cluster- ClusterrelOptTable- Tablehints- The hints
-
withHints
-