Package org.apache.calcite.rel.metadata
Class RelMdColumnUniqueness
java.lang.Object
org.apache.calcite.rel.metadata.RelMdColumnUniqueness
- All Implemented Interfaces:
MetadataHandler<BuiltInMetadata.ColumnUniqueness>
public class RelMdColumnUniqueness
extends Object
implements MetadataHandler<BuiltInMetadata.ColumnUniqueness>
RelMdColumnUniqueness supplies a default implementation of
RelMetadataQuery.areColumnsUnique(org.apache.calcite.rel.RelNode, org.apache.calcite.util.ImmutableBitSet)
for the standard logical algebra.-
Field Summary
-
Method Summary
Modifier and TypeMethodDescription@Nullable Boolean
areColumnsUnique
(RelSubset rel, RelMetadataQuery mq, ImmutableBitSet columns, boolean ignoreNulls) @Nullable Boolean
areColumnsUnique
(Converter rel, RelMetadataQuery mq, ImmutableBitSet columns, boolean ignoreNulls) @Nullable Boolean
areColumnsUnique
(Aggregate rel, RelMetadataQuery mq, ImmutableBitSet columns, boolean ignoreNulls) @Nullable Boolean
areColumnsUnique
(Calc rel, RelMetadataQuery mq, ImmutableBitSet columns, boolean ignoreNulls) @Nullable Boolean
areColumnsUnique
(Correlate rel, RelMetadataQuery mq, ImmutableBitSet columns, boolean ignoreNulls) @Nullable Boolean
areColumnsUnique
(Exchange rel, RelMetadataQuery mq, ImmutableBitSet columns, boolean ignoreNulls) @Nullable Boolean
areColumnsUnique
(Filter rel, RelMetadataQuery mq, ImmutableBitSet columns, boolean ignoreNulls) areColumnsUnique
(Intersect rel, RelMetadataQuery mq, ImmutableBitSet columns, boolean ignoreNulls) @Nullable Boolean
areColumnsUnique
(Join rel, RelMetadataQuery mq, ImmutableBitSet columns, boolean ignoreNulls) @Nullable Boolean
areColumnsUnique
(Minus rel, RelMetadataQuery mq, ImmutableBitSet columns, boolean ignoreNulls) @Nullable Boolean
areColumnsUnique
(Project rel, RelMetadataQuery mq, ImmutableBitSet columns, boolean ignoreNulls) areColumnsUnique
(SetOp rel, RelMetadataQuery mq, ImmutableBitSet columns, boolean ignoreNulls) @Nullable Boolean
areColumnsUnique
(Sort rel, RelMetadataQuery mq, ImmutableBitSet columns, boolean ignoreNulls) @Nullable Boolean
areColumnsUnique
(TableModify rel, RelMetadataQuery mq, ImmutableBitSet columns, boolean ignoreNulls) areColumnsUnique
(TableScan scan, RelMetadataQuery mq, ImmutableBitSet columns, boolean ignoreNulls) areColumnsUnique
(Values rel, RelMetadataQuery mq, ImmutableBitSet columns, boolean ignoreNulls) @Nullable Boolean
areColumnsUnique
(RelNode rel, RelMetadataQuery mq, ImmutableBitSet columns, boolean ignoreNulls) Catch-all implementation forBuiltInMetadata.ColumnUniqueness.areColumnsUnique(ImmutableBitSet, boolean)
, invoked using reflection, for any relational expression not handled by a more specific method.getDef()
-
Field Details
-
SOURCE
-
-
Method Details
-
getDef
- Specified by:
getDef
in interfaceMetadataHandler<BuiltInMetadata.ColumnUniqueness>
-
areColumnsUnique
public Boolean areColumnsUnique(TableScan scan, RelMetadataQuery mq, ImmutableBitSet columns, boolean ignoreNulls) -
areColumnsUnique
public @Nullable Boolean areColumnsUnique(Filter rel, RelMetadataQuery mq, ImmutableBitSet columns, boolean ignoreNulls) -
areColumnsUnique
public @Nullable Boolean areColumnsUnique(RelNode rel, RelMetadataQuery mq, ImmutableBitSet columns, boolean ignoreNulls) Catch-all implementation forBuiltInMetadata.ColumnUniqueness.areColumnsUnique(ImmutableBitSet, boolean)
, invoked using reflection, for any relational expression not handled by a more specific method.- Parameters:
rel
- Relational expressionmq
- Metadata querycolumns
- column mask representing the subset of columns for which uniqueness will be determinedignoreNulls
- if true, ignore null values when determining column uniqueness- Returns:
- whether the columns are unique, or null if not enough information is available to make that determination
- See Also:
-
areColumnsUnique
public Boolean areColumnsUnique(SetOp rel, RelMetadataQuery mq, ImmutableBitSet columns, boolean ignoreNulls) -
areColumnsUnique
public Boolean areColumnsUnique(Intersect rel, RelMetadataQuery mq, ImmutableBitSet columns, boolean ignoreNulls) -
areColumnsUnique
public @Nullable Boolean areColumnsUnique(Minus rel, RelMetadataQuery mq, ImmutableBitSet columns, boolean ignoreNulls) -
areColumnsUnique
public @Nullable Boolean areColumnsUnique(Sort rel, RelMetadataQuery mq, ImmutableBitSet columns, boolean ignoreNulls) -
areColumnsUnique
public @Nullable Boolean areColumnsUnique(TableModify rel, RelMetadataQuery mq, ImmutableBitSet columns, boolean ignoreNulls) -
areColumnsUnique
public @Nullable Boolean areColumnsUnique(Exchange rel, RelMetadataQuery mq, ImmutableBitSet columns, boolean ignoreNulls) -
areColumnsUnique
public @Nullable Boolean areColumnsUnique(Correlate rel, RelMetadataQuery mq, ImmutableBitSet columns, boolean ignoreNulls) -
areColumnsUnique
public @Nullable Boolean areColumnsUnique(Project rel, RelMetadataQuery mq, ImmutableBitSet columns, boolean ignoreNulls) -
areColumnsUnique
public @Nullable Boolean areColumnsUnique(Calc rel, RelMetadataQuery mq, ImmutableBitSet columns, boolean ignoreNulls) -
areColumnsUnique
public @Nullable Boolean areColumnsUnique(Join rel, RelMetadataQuery mq, ImmutableBitSet columns, boolean ignoreNulls) -
areColumnsUnique
public @Nullable Boolean areColumnsUnique(Aggregate rel, RelMetadataQuery mq, ImmutableBitSet columns, boolean ignoreNulls) -
areColumnsUnique
public Boolean areColumnsUnique(Values rel, RelMetadataQuery mq, ImmutableBitSet columns, boolean ignoreNulls) -
areColumnsUnique
public @Nullable Boolean areColumnsUnique(Converter rel, RelMetadataQuery mq, ImmutableBitSet columns, boolean ignoreNulls) -
areColumnsUnique
public @Nullable Boolean areColumnsUnique(RelSubset rel, RelMetadataQuery mq, ImmutableBitSet columns, boolean ignoreNulls)
-