public class RelOptTableImpl extends Prepare.AbstractPreparingTable
RelOptTable.RelOptTable.ToRelContext, RelOptTable.ViewExpander| Modifier and Type | Method and Description |
|---|---|
static List<ColumnStrategy> |
columnStrategies(RelOptTable table)
|
RelOptTableImpl |
copy(RelDataType newRowType)
Creates a copy of this RelOptTable.
|
static RelOptTableImpl |
create(@Nullable RelOptSchema schema,
RelDataType rowType,
CalciteSchema.TableEntry tableEntry,
@Nullable Double rowCount) |
static RelOptTableImpl |
create(@Nullable RelOptSchema schema,
RelDataType rowType,
List<String> names,
org.apache.calcite.linq4j.tree.Expression expression) |
static RelOptTableImpl |
create(@Nullable RelOptSchema schema,
RelDataType rowType,
List<String> names,
Table table,
org.apache.calcite.linq4j.tree.Expression expression)
Deprecated.
|
static RelOptTableImpl |
create(@Nullable RelOptSchema schema,
RelDataType rowType,
List<String> names,
Table table,
org.apache.calcite.linq4j.tree.TableExpressionFactory expressionFactory)
Creates
RelOptTableImpl instance with specified arguments
and row count obtained from table statistic. |
static RelOptTableImpl |
create(@Nullable RelOptSchema schema,
RelDataType rowType,
Table table,
com.google.common.collect.ImmutableList<String> names) |
static RelOptTableImpl |
create(@Nullable RelOptSchema schema,
RelDataType rowType,
Table table,
Path path) |
boolean |
equals(@Nullable Object obj) |
protected RelOptTable |
extend(Table extendedTable)
Implementation-specific code to instantiate a new
RelOptTable
based on a Table that has been extended. |
SqlAccessType |
getAllowedAccess()
Returns the access type of the table.
|
@Nullable List<RelCollation> |
getCollationList()
Returns a description of the physical ordering (or orderings) of the rows
returned from this table.
|
@Nullable RelDistribution |
getDistribution()
Returns a description of the physical distribution of the rows
in this table.
|
@Nullable org.apache.calcite.linq4j.tree.Expression |
getExpression(Class clazz)
Generates code for this table.
|
@Nullable List<ImmutableBitSet> |
getKeys()
Returns a list of unique keys, empty list if no key exist,
the result should be consistent with
isKey. |
SqlMonotonicity |
getMonotonicity(String columnName)
Returns whether a given column is monotonic.
|
List<String> |
getQualifiedName()
Obtains an identifier for this table.
|
@Nullable List<RelReferentialConstraint> |
getReferentialConstraints()
Returns the referential constraints existing for this table.
|
@Nullable 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.
|
int |
hashCode() |
boolean |
isKey(ImmutableBitSet columns)
Returns whether the given columns are a key or a superset of a unique key
of this table.
|
boolean |
isTemporal()
Returns whether the table is temporal.
|
static int |
realOrdinal(RelOptTable table,
int i)
Converts the ordinal of a field into the ordinal of a stored field.
|
static RelDataType |
realRowType(RelOptTable table)
Returns the row type of a table after any
ColumnStrategy.VIRTUAL
columns have been removed. |
boolean |
supportsModality(SqlModality modality) |
RelNode |
toRel(RelOptTable.ToRelContext context)
Converts this table into a
relational expression. |
String |
toString() |
<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.
|
columnHasDefaultValue, extend, getColumnStrategiesclone, finalize, getClass, notify, notifyAll, wait, wait, waittablemaybeUnwrap, unwrapOrThrowpublic static RelOptTableImpl create(@Nullable RelOptSchema schema, RelDataType rowType, List<String> names, org.apache.calcite.linq4j.tree.Expression expression)
@Deprecated public static RelOptTableImpl create(@Nullable RelOptSchema schema, RelDataType rowType, List<String> names, Table table, org.apache.calcite.linq4j.tree.Expression expression)
public static RelOptTableImpl create(@Nullable RelOptSchema schema, RelDataType rowType, List<String> names, Table table, org.apache.calcite.linq4j.tree.TableExpressionFactory expressionFactory)
RelOptTableImpl instance with specified arguments
and row count obtained from table statistic.schema - table schemarowType - table row typenames - full table pathtable - tableexpressionFactory - expression function for accessing table data
in the generated codeRelOptTableImpl instancepublic static RelOptTableImpl create(@Nullable RelOptSchema schema, RelDataType rowType, Table table, Path path)
public static RelOptTableImpl create(@Nullable RelOptSchema schema, RelDataType rowType, CalciteSchema.TableEntry tableEntry, @Nullable Double rowCount)
public RelOptTableImpl copy(RelDataType newRowType)
public static RelOptTableImpl create(@Nullable RelOptSchema schema, RelDataType rowType, Table table, com.google.common.collect.ImmutableList<String> names)
public <T> T unwrap(Class<T> clazz)
Wrapperpublic @Nullable org.apache.calcite.linq4j.tree.Expression getExpression(Class clazz)
RelOptTableclazz - The desired collection class; for example Queryable.protected RelOptTable extend(Table extendedTable)
Prepare.AbstractPreparingTableRelOptTable
based on a Table that has been extended.extend in class Prepare.AbstractPreparingTablepublic double getRowCount()
RelOptTablepublic @Nullable RelOptSchema getRelOptSchema()
RelOptTableRelOptSchema this table belongs to.public RelNode toRel(RelOptTable.ToRelContext context)
RelOptTablerelational 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.
public @Nullable List<RelCollation> getCollationList()
RelOptTableRelMetadataQuery.collations(RelNode)public @Nullable RelDistribution getDistribution()
RelOptTableRelMetadataQuery.distribution(RelNode)public boolean isKey(ImmutableBitSet columns)
RelOptTablecolumns - Ordinals of key columnspublic @Nullable List<ImmutableBitSet> getKeys()
RelOptTableisKey.public @Nullable List<RelReferentialConstraint> getReferentialConstraints()
RelOptTableRelReferentialConstraint nodes.public RelDataType getRowType()
RelOptTablepublic boolean supportsModality(SqlModality modality)
public boolean isTemporal()
SqlValidatorTablepublic List<String> getQualifiedName()
RelOptTablepublic SqlMonotonicity getMonotonicity(String columnName)
SqlValidatorTablepublic SqlAccessType getAllowedAccess()
SqlValidatorTablepublic static List<ColumnStrategy> columnStrategies(RelOptTable table)
public static int realOrdinal(RelOptTable table, int i)
public static RelDataType realRowType(RelOptTable table)
ColumnStrategy.VIRTUAL
columns have been removed. This is the type of the records that are
actually stored.Copyright © 2012-2022 Apache Software Foundation. All Rights Reserved.