Class StatisticsObjectConfiguration

    • Field Detail

      • DEFAULT_OBSOLESCENCE_MAX_PERCENT

        public static final byte DEFAULT_OBSOLESCENCE_MAX_PERCENT
        Rows limit to renew partition statistics in percent.
        See Also:
        Constant Field Values
    • Constructor Detail

      • StatisticsObjectConfiguration

        public StatisticsObjectConfiguration​(StatisticsKey key,
                                             Collection<StatisticsColumnConfiguration> cols,
                                             byte maxPartitionObsolescencePercent)
        Constructor.
        Parameters:
        key - Statistics key.
        cols - Column statistics configuration.
        maxPartitionObsolescencePercent - Maximum number of changed rows per partition.
      • StatisticsObjectConfiguration

        public StatisticsObjectConfiguration​(StatisticsKey key)
        Constructor.
        Parameters:
        key - Statistics key.
    • Method Detail

      • dropColumns

        public StatisticsObjectConfiguration dropColumns​(Set<String> dropColNames)
        Creates new configuration object for drop specified columns from current configuration. Marks dropped columns as tombstone.
        Parameters:
        dropColNames - Set of dropped columns.
        Returns:
        Result configuration object.
      • refresh

        public StatisticsObjectConfiguration refresh​(Set<String> refreshCols)
        Creates new configuration object to refresh statistic with current configuration.
        Parameters:
        refreshCols - Set of columns to refresh, if null or empty - all columns will be refreshed.
        Returns:
        Result configuration object.
      • key

        public StatisticsKey key()
        Get database object key (schema and name).
        Returns:
        statistic key.
      • columnsAll

        public Map<String,​StatisticsColumnConfiguration> columnsAll()
        Get configurations of all statistic columns includes tombstone configuration objects (dropped columns).
        Returns:
        statistic key.
      • columns

        public Map<String,​StatisticsColumnConfiguration> columns()
        Get active (non tombstone) columns statistics configuration.
        Returns:
        Map column name to column statistics configuration.
      • maxPartitionObsolescencePercent

        public byte maxPartitionObsolescencePercent()
        Returns:
        Maximum number of changed rows per partition.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • compareTo

        public int compareTo​(@NotNull
                             @NotNull StatisticsObjectConfiguration o)
        Compare only configuration from the same branch. I.e. can't correctly compare Cfg(A=v1,B=v3) vs Cfg(A=v2,B=v1) Cfg(A=v1,B=v3) vs Cfg(A=v1,C=v2) because there is no changes chain to get one from another.
        Specified by:
        compareTo in interface Comparable<StatisticsObjectConfiguration>
        Parameters:
        o - Other configuration to compare.
        Returns:
        Comparison result.