Package org.apache.calcite.plan
Class RelOptAbstractTable
java.lang.Object
org.apache.calcite.plan.RelOptAbstractTable
- All Implemented Interfaces:
RelOptTable,Wrapper
Partial implementation of
RelOptTable.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.calcite.plan.RelOptTable
RelOptTable.ToRelContext, RelOptTable.ViewExpander -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Stringprotected final RelDataTypeprotected final RelOptSchema -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedRelOptAbstractTable(RelOptSchema schema, String name, RelDataType rowType) -
Method Summary
Modifier and TypeMethodDescriptionextend(List<RelDataTypeField> extendedFields) Returns a table with the given extra fields.@Nullable List<RelCollation>Returns a description of the physical ordering (or orderings) of the rows returned from this table.Returns a list describing how each column is populated.@Nullable RelDistributionReturns a description of the physical distribution of the rows in this table.@Nullable ExpressiongetExpression(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 withisKey.getName()Obtains an identifier for this table.@Nullable List<RelReferentialConstraint>Returns the referential constraints existing for this table.Returns theRelOptSchemathis table belongs to.doubleReturns an estimate of the number of rows in the table.Describes the type of rows returned by this table.booleanisKey(ImmutableBitSet columns) Returns whether the given columns are a key or a superset of a unique key of this table.toRel(RelOptTable.ToRelContext context) Converts this table into arelational expression.<T> @Nullable TFinds an instance of an interface implemented by this object, or returns null if this object does not support that interface.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.calcite.schema.Wrapper
maybeUnwrap, unwrapOrThrow
-
Field Details
-
schema
-
rowType
-
name
-
-
Constructor Details
-
RelOptAbstractTable
-
-
Method Details
-
getName
-
getQualifiedName
Description copied from interface:RelOptTableObtains an identifier for this table. The identifier must be unique with respect to the Connection producing this table.- Specified by:
getQualifiedNamein interfaceRelOptTable- Returns:
- qualified name
-
getRowCount
public double getRowCount()Description copied from interface:RelOptTableReturns an estimate of the number of rows in the table.- Specified by:
getRowCountin interfaceRelOptTable
-
getRowType
Description copied from interface:RelOptTableDescribes the type of rows returned by this table.- Specified by:
getRowTypein interfaceRelOptTable
-
getRelOptSchema
Description copied from interface:RelOptTableReturns theRelOptSchemathis table belongs to.- Specified by:
getRelOptSchemain interfaceRelOptTable
-
getCollationList
Description copied from interface:RelOptTableReturns a description of the physical ordering (or orderings) of the rows returned from this table.- Specified by:
getCollationListin interfaceRelOptTable- See Also:
-
getDistribution
Description copied from interface:RelOptTableReturns a description of the physical distribution of the rows in this table.- Specified by:
getDistributionin interfaceRelOptTable- See Also:
-
unwrap
Description copied from interface:WrapperFinds an instance of an interface implemented by this object, or returns null if this object does not support that interface. -
isKey
Description copied from interface:RelOptTableReturns whether the given columns are a key or a superset of a unique key of this table.- Specified by:
isKeyin interfaceRelOptTable- Parameters:
columns- Ordinals of key columns- Returns:
- Whether the given columns are a key or a superset of a key
-
getKeys
Description copied from interface:RelOptTableReturns a list of unique keys, empty list if no key exist, the result should be consistent withisKey.- Specified by:
getKeysin interfaceRelOptTable
-
getReferentialConstraints
Description copied from interface:RelOptTableReturns the referential constraints existing for this table. These constraints are represented over other tables usingRelReferentialConstraintnodes.- Specified by:
getReferentialConstraintsin interfaceRelOptTable
-
toRel
Description copied from interface:RelOptTableConverts this table into arelational expression.The
plannercalls this method to convert a table into an initial relational expression, generally something abstract, such as aLogicalTableScan, then optimizes this expression by applyingrulesto transform it into more efficient access methods for this table.- Specified by:
toRelin interfaceRelOptTable
-
getExpression
Description copied from interface:RelOptTableGenerates code for this table.- Specified by:
getExpressionin interfaceRelOptTable- Parameters:
clazz- The desired collection class; for exampleQueryable.- Returns:
- the code for the table, or null if code generation is not supported
-
extend
Description copied from interface:RelOptTableReturns a table with the given extra fields.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.
- Specified by:
extendin interfaceRelOptTable
-
getColumnStrategies
Description copied from interface:RelOptTableReturns a list describing how each column is populated. The list has the same number of entries as there are fields, and is immutable.- Specified by:
getColumnStrategiesin interfaceRelOptTable
-