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:
Cloneable
,org.apache.calcite.plan.RelOptNode
,org.apache.calcite.rel.hint.Hintable
,org.apache.calcite.rel.RelNode
public final class LogicalTableScan extends org.apache.calcite.rel.core.TableScan
ALogicalTableScan
reads all the rows from aRelOptTable
.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.
-
-
Constructor Summary
Constructors Constructor Description LogicalTableScan(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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.calcite.rel.RelNode
copy(org.apache.calcite.plan.RelTraitSet traitSet, List<org.apache.calcite.rel.RelNode> inputs)
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.org.apache.calcite.rel.RelWriter
explainTerms(org.apache.calcite.rel.RelWriter pw)
org.apache.calcite.rel.RelNode
withHints(List<org.apache.calcite.rel.hint.RelHint> hintList)
-
Methods inherited from class org.apache.calcite.rel.core.TableScan
accept, computeSelfCost, deriveRowType, estimateRowCount, 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
-
-
-
-
Constructor Detail
-
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 Detail
-
copy
public org.apache.calcite.rel.RelNode copy(org.apache.calcite.plan.RelTraitSet traitSet, List<org.apache.calcite.rel.RelNode> inputs)
- Specified by:
copy
in interfaceorg.apache.calcite.rel.RelNode
- Overrides:
copy
in classorg.apache.calcite.rel.AbstractRelNode
-
explainTerms
public org.apache.calcite.rel.RelWriter explainTerms(org.apache.calcite.rel.RelWriter pw)
- Overrides:
explainTerms
in 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
public org.apache.calcite.rel.RelNode withHints(List<org.apache.calcite.rel.hint.RelHint> hintList)
-
-