Package org.apache.calcite.rel.metadata
Interface MetadataFactory
- All Known Implementing Classes:
MetadataFactoryImpl
public interface MetadataFactory
Source of metadata about relational expressions.
The metadata is typically various kinds of statistics used to estimate costs.
Each kind of metadata has an interface that extends Metadata
and
has a method. Some examples: BuiltInMetadata.Selectivity
,
BuiltInMetadata.ColumnUniqueness
.
-
Method Summary
Modifier and TypeMethodDescription<@Nullable M extends @Nullable Metadata>
Mquery
(RelNode rel, RelMetadataQuery mq, Class<@Nullable M> metadataClazz) Returns a metadata interface to get a particular kind of metadata from a particular relational expression.
-
Method Details
-
query
<@Nullable M extends @Nullable Metadata> M query(RelNode rel, RelMetadataQuery mq, Class<@Nullable M> metadataClazz) Returns a metadata interface to get a particular kind of metadata from a particular relational expression. Returns null if that kind of metadata is not available.- Type Parameters:
M
- Metadata type- Parameters:
rel
- Relational expressionmq
- Metadata querymetadataClazz
- Metadata class- Returns:
- Metadata bound to
rel
andquery
-