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 Type
    Method
    Description
    <@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.
  • 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 expression
      mq - Metadata query
      metadataClazz - Metadata class
      Returns:
      Metadata bound to rel and query