Class VolcanoRelMetadataProvider

  • All Implemented Interfaces:
    RelMetadataProvider

    public class VolcanoRelMetadataProvider
    extends java.lang.Object
    implements RelMetadataProvider
    VolcanoRelMetadataProvider implements the RelMetadataProvider interface by combining metadata from the rels making up an equivalence class.
    • Constructor Detail

      • VolcanoRelMetadataProvider

        public VolcanoRelMetadataProvider()
    • Method Detail

      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • apply

        public <M extends MetadataUnboundMetadata<M> apply​(java.lang.Class<? extends RelNode> relClass,
                                                             java.lang.Class<? extends M> metadataClass)
        Description copied from interface: RelMetadataProvider
        Retrieves metadata of a particular type and for a particular sub-class of relational expression.

        The object returned is a function. It can be applied to a relational expression of the given type to create a metadata object.

        For example, you might call

         RelMetadataProvider provider;
         LogicalFilter filter;
         RexNode predicate;
         Function<RelNode, Metadata> function =
           provider.apply(LogicalFilter.class, Selectivity.class};
         Selectivity selectivity = function.apply(filter);
         Double d = selectivity.selectivity(predicate);
         
        Specified by:
        apply in interface RelMetadataProvider
        Parameters:
        relClass - Type of relational expression
        metadataClass - Type of metadata
        Returns:
        Function that will field a metadata instance; or null if this provider cannot supply metadata of this type