Package org.apache.calcite.statistic
Enum MapSqlStatisticProvider
- All Implemented Interfaces:
- Serializable,- Comparable<MapSqlStatisticProvider>,- Constable,- SqlStatisticProvider
public enum MapSqlStatisticProvider
extends Enum<MapSqlStatisticProvider>
implements SqlStatisticProvider
Implementation of 
SqlStatisticProvider that looks up values in a
 table.
 Only for testing.
- 
Nested Class SummaryNested classes/interfaces inherited from class java.lang.EnumEnum.EnumDesc<E extends Enum<E>>
- 
Enum Constant SummaryEnum Constants
- 
Method SummaryModifier and TypeMethodDescriptionbooleanisForeignKey(RelOptTable fromTable, List<Integer> fromColumns, RelOptTable toTable, List<Integer> toColumns) Returns whether a join is a foreign key; that is, whether every row in the referencing table is matched by at least one row in the referenced table.booleanisKey(RelOptTable table, List<Integer> columns) Returns whether a collection of columns is a unique (or primary) key.doubletableCardinality(RelOptTable table) Returns an estimate of the number of rows intable.static MapSqlStatisticProviderReturns the enum constant of this type with the specified name.static MapSqlStatisticProvider[]values()Returns an array containing the constants of this enum type, in the order they are declared.
- 
Enum Constant Details- 
INSTANCE
 
- 
- 
Method Details- 
valuesReturns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
 
- 
valueOfReturns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
- name- the name of the enum constant to be returned.
- Returns:
- the enum constant with the specified name
- Throws:
- IllegalArgumentException- if this enum type has no constant with the specified name
- NullPointerException- if the argument is null
 
- 
tableCardinalityDescription copied from interface:SqlStatisticProviderReturns an estimate of the number of rows intable.- Specified by:
- tableCardinalityin interface- SqlStatisticProvider
 
- 
isForeignKeypublic boolean isForeignKey(RelOptTable fromTable, List<Integer> fromColumns, RelOptTable toTable, List<Integer> toColumns) Description copied from interface:SqlStatisticProviderReturns whether a join is a foreign key; that is, whether every row in the referencing table is matched by at least one row in the referenced table.For example, isForeignKey(EMP, [DEPTNO], DEPT, [DEPTNO])returns true.To change "at least one" to "exactly one", you also need to call SqlStatisticProvider.isKey(org.apache.calcite.plan.RelOptTable, java.util.List<java.lang.Integer>).- Specified by:
- isForeignKeyin interface- SqlStatisticProvider
 
- 
isKeyDescription copied from interface:SqlStatisticProviderReturns whether a collection of columns is a unique (or primary) key.For example, isKey(EMP, [DEPTNO]returns true;isKey(DEPT, [DEPTNO]returns false.- Specified by:
- isKeyin interface- SqlStatisticProvider
 
 
-