public abstract class RelOptAbstractTable extends Object implements RelOptTable
RelOptTable
.RelOptTable.ToRelContext, RelOptTable.ViewExpander
Modifier and Type | Field and Description |
---|---|
protected String |
name |
protected RelDataType |
rowType |
protected RelOptSchema |
schema |
Modifier | Constructor and Description |
---|---|
protected |
RelOptAbstractTable(RelOptSchema schema,
String name,
RelDataType rowType) |
Modifier and Type | Method and Description |
---|---|
RelOptTable |
extend(List<RelDataTypeField> extendedFields)
Returns a table with the given extra fields.
|
List<RelCollation> |
getCollationList()
Returns a description of the physical ordering (or orderings) of the rows
returned from this table.
|
List<ColumnStrategy> |
getColumnStrategies()
Returns a list describing how each column is populated.
|
RelDistribution |
getDistribution()
Returns a description of the physical distribution of the rows
in this table.
|
org.apache.calcite.linq4j.tree.Expression |
getExpression(Class clazz)
Generates code for this table.
|
List<ImmutableBitSet> |
getKeys()
Returns a list of unique keys, empty list if no key exist,
the result should be consistent with
isKey . |
String |
getName() |
List<String> |
getQualifiedName()
Obtains an identifier for this table.
|
List<RelReferentialConstraint> |
getReferentialConstraints()
Returns the referential constraints existing for this table.
|
RelOptSchema |
getRelOptSchema()
Returns the
RelOptSchema this table belongs to. |
double |
getRowCount()
Returns an estimate of the number of rows in the table.
|
RelDataType |
getRowType()
Describes the type of rows returned by this table.
|
boolean |
isKey(ImmutableBitSet columns)
Returns whether the given columns are a key or a superset of a unique key
of this table.
|
RelNode |
toRel(RelOptTable.ToRelContext context)
Converts this table into a
relational expression . |
<T> T |
unwrap(Class<T> clazz)
Finds an instance of an interface implemented by this object,
or returns null if this object does not support that interface.
|
protected final RelOptSchema schema
protected final RelDataType rowType
protected final String name
protected RelOptAbstractTable(RelOptSchema schema, String name, RelDataType rowType)
public String getName()
public List<String> getQualifiedName()
RelOptTable
getQualifiedName
in interface RelOptTable
public double getRowCount()
RelOptTable
getRowCount
in interface RelOptTable
public RelDataType getRowType()
RelOptTable
getRowType
in interface RelOptTable
public RelOptSchema getRelOptSchema()
RelOptTable
RelOptSchema
this table belongs to.getRelOptSchema
in interface RelOptTable
public List<RelCollation> getCollationList()
RelOptTable
getCollationList
in interface RelOptTable
RelMetadataQuery.collations(RelNode)
public RelDistribution getDistribution()
RelOptTable
getDistribution
in interface RelOptTable
RelMetadataQuery.distribution(RelNode)
public <T> T unwrap(Class<T> clazz)
Wrapper
public boolean isKey(ImmutableBitSet columns)
RelOptTable
isKey
in interface RelOptTable
columns
- Ordinals of key columnspublic List<ImmutableBitSet> getKeys()
RelOptTable
isKey
.getKeys
in interface RelOptTable
public List<RelReferentialConstraint> getReferentialConstraints()
RelOptTable
RelReferentialConstraint
nodes.getReferentialConstraints
in interface RelOptTable
public RelNode toRel(RelOptTable.ToRelContext context)
RelOptTable
relational expression
.
The planner
calls this
method to convert a table into an initial relational expression,
generally something abstract, such as a
LogicalTableScan
,
then optimizes this expression by
applying rules
to transform it
into more efficient access methods for this table.
toRel
in interface RelOptTable
public org.apache.calcite.linq4j.tree.Expression getExpression(Class clazz)
RelOptTable
getExpression
in interface RelOptTable
clazz
- The desired collection class; for example Queryable
.public RelOptTable extend(List<RelDataTypeField> extendedFields)
RelOptTable
The extended table includes the fields of this base table plus the extended fields that do not have the same name as a field in the base table.
extend
in interface RelOptTable
public List<ColumnStrategy> getColumnStrategies()
RelOptTable
getColumnStrategies
in interface RelOptTable
Copyright © 2012-2020 Apache Software Foundation. All Rights Reserved.