Class StatisticsImpl

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private long numRows  
      private long numUnique  
    • Constructor Summary

      Constructors 
      Constructor Description
      StatisticsImpl()
      Zero argument constructor for Formatable Interface
      StatisticsImpl​(long numRows, long numUnique)
      Constructor for StatisticsImpl.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long getRowEstimate()
      Returns the estimated number of rows in the index.
      int getTypeFormatId()
      Get a universally unique identifier for the type of this object.
      void readExternal​(java.io.ObjectInput in)  
      double selectivity​(java.lang.Object[] predicates)  
      java.lang.String toString()  
      void writeExternal​(java.io.ObjectOutput out)
      Write this object to a stream of stored objects.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • numRows

        private long numRows
      • numUnique

        private long numUnique
    • Constructor Detail

      • StatisticsImpl

        public StatisticsImpl​(long numRows,
                              long numUnique)
        Constructor for StatisticsImpl.
        Parameters:
        numRows - number of rows in the conglomerate for which this statistic is being created.
        numUnique - number of unique values in the key for which this statistic is being created.
      • StatisticsImpl

        public StatisticsImpl()
        Zero argument constructor for Formatable Interface
    • Method Detail

      • getRowEstimate

        public long getRowEstimate()
        Returns the estimated number of rows in the index.
        Specified by:
        getRowEstimate in interface Statistics
        Returns:
        Number of rows.
      • readExternal

        public void readExternal​(java.io.ObjectInput in)
                          throws java.io.IOException,
                                 java.lang.ClassNotFoundException
        Specified by:
        readExternal in interface java.io.Externalizable
        Throws:
        java.io.IOException
        java.lang.ClassNotFoundException
        See Also:
        Externalizable.readExternal(java.io.ObjectInput)
      • writeExternal

        public void writeExternal​(java.io.ObjectOutput out)
                           throws java.io.IOException
        Write this object to a stream of stored objects.
        Specified by:
        writeExternal in interface java.io.Externalizable
        Parameters:
        out - write bytes here.
        Throws:
        java.io.IOException - thrown on error
      • getTypeFormatId

        public int getTypeFormatId()
        Description copied from interface: TypedFormat
        Get a universally unique identifier for the type of this object.
        Specified by:
        getTypeFormatId in interface TypedFormat
        Returns:
        the format id which corresponds to this class.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
        See Also:
        Object.toString()