Class ProfilerImpl.Run

  • Enclosing class:
    ProfilerImpl

    class ProfilerImpl.Run
    extends java.lang.Object
    A run of the profiler.
    • Constructor Detail

      • Run

        Run​(java.util.List<Profiler.Column> columns,
            java.util.Collection<ImmutableBitSet> initialGroups)
        Creates a Run.
        Parameters:
        columns - List of columns
        initialGroups - List of combinations of columns that should be profiled early, because they may be interesting
    • Method Detail

      • profile

        Profiler.Profile profile​(java.lang.Iterable<java.util.List<java.lang.Comparable>> rows)
      • nextBatch

        java.util.List<ProfilerImpl.Space> nextBatch​(int pass)
        Populates spaces with the next batch. Returns an empty list if done.
      • pass

        void pass​(int pass,
                  java.util.List<ProfilerImpl.Space> spaces,
                  java.lang.Iterable<java.util.List<java.lang.Comparable>> rows)
      • cardinality

        private double cardinality​(double rowCount,
                                   ImmutableBitSet columns)
        Estimates the cardinality of a collection of columns represented by columnOrdinals, drawing on existing distributions.
      • expectedCardinality

        private double expectedCardinality​(double rowCount,
                                           ImmutableBitSet columns)
        Estimates the cardinality of a collection of columns represented by columnOrdinals, drawing on existing distributions. Does not look in the distribution map for this column set.
      • toColumns

        private com.google.common.collect.ImmutableSortedSet<Profiler.Column> toColumns​(java.lang.Iterable<java.lang.Integer> ordinals)