class ProfilerImpl.Run extends Object
| Modifier and Type | Field and Description |
|---|---|
private List<Profiler.Column> |
columns |
(package private) Map<ImmutableBitSet,Profiler.Distribution> |
distributions |
(package private) Queue<ProfilerImpl.Space> |
doneQueue
Combinations of columns that we have computed but whose successors have
not yet been computed.
|
(package private) List<Profiler.FunctionalDependency> |
functionalDependencies |
(package private) com.google.common.base.Function<Integer,Profiler.Column> |
get |
private List<ImmutableBitSet> |
keyOrdinalLists |
(package private) PartiallyOrderedSet<ImmutableBitSet> |
keyPoset |
(package private) PartiallyOrderedSet<ProfilerImpl.Space> |
results |
(package private) Set<ImmutableBitSet> |
resultSet
Column ordinals that have ever been placed on
spaceQueue. |
private int |
rowCount |
(package private) List<ProfilerImpl.Space> |
singletonSpaces
List of spaces that have one column.
|
(package private) Deque<ImmutableBitSet> |
spaceQueue
Combinations of columns that we will compute next pass.
|
(package private) ProfilerImpl.SurpriseQueue |
surprises |
(package private) List<Profiler.Unique> |
uniques |
| Constructor and Description |
|---|
Run(List<Profiler.Column> columns,
Collection<ImmutableBitSet> initialGroups)
Creates a Run.
|
| Modifier and Type | Method and Description |
|---|---|
private double |
cardinality(double rowCount,
ImmutableBitSet columns)
Estimates the cardinality of a collection of columns represented by
columnOrdinals, drawing on existing distributions. |
private boolean |
containsKey(ImmutableBitSet ordinals) |
private double |
expectedCardinality(double rowCount,
ImmutableBitSet columns)
Estimates the cardinality of a collection of columns represented by
columnOrdinals, drawing on existing distributions. |
(package private) List<ProfilerImpl.Space> |
nextBatch(int pass)
Populates
spaces with the next batch. |
(package private) void |
pass(int pass,
List<ProfilerImpl.Space> spaces,
Iterable<List<Comparable>> rows) |
(package private) Profiler.Profile |
profile(Iterable<List<Comparable>> rows) |
private com.google.common.collect.ImmutableSortedSet<Profiler.Column> |
toColumns(Iterable<Integer> ordinals) |
private final List<Profiler.Column> columns
final PartiallyOrderedSet<ImmutableBitSet> keyPoset
final Map<ImmutableBitSet,Profiler.Distribution> distributions
final List<ProfilerImpl.Space> singletonSpaces
final Queue<ProfilerImpl.Space> doneQueue
spaceQueue.final ProfilerImpl.SurpriseQueue surprises
final Deque<ImmutableBitSet> spaceQueue
final List<Profiler.Unique> uniques
final List<Profiler.FunctionalDependency> functionalDependencies
final Set<ImmutableBitSet> resultSet
spaceQueue.
Ensures that we do not calculate the same combination more than once,
even though we generate a column set from multiple parents.final PartiallyOrderedSet<ProfilerImpl.Space> results
private final List<ImmutableBitSet> keyOrdinalLists
final com.google.common.base.Function<Integer,Profiler.Column> get
private int rowCount
Run(List<Profiler.Column> columns, Collection<ImmutableBitSet> initialGroups)
columns - List of columnsinitialGroups - List of combinations of columns that should be
profiled early, because they may be interestingProfiler.Profile profile(Iterable<List<Comparable>> rows)
List<ProfilerImpl.Space> nextBatch(int pass)
spaces with the next batch.
Returns an empty list if done.private boolean containsKey(ImmutableBitSet ordinals)
void pass(int pass,
List<ProfilerImpl.Space> spaces,
Iterable<List<Comparable>> rows)
private double cardinality(double rowCount,
ImmutableBitSet columns)
columnOrdinals, drawing on existing distributions.private double expectedCardinality(double rowCount,
ImmutableBitSet columns)
columnOrdinals, drawing on existing distributions. Does not
look in the distribution map for this column set.private com.google.common.collect.ImmutableSortedSet<Profiler.Column> toColumns(Iterable<Integer> ordinals)
Copyright © 2012–2018 The Apache Software Foundation. All rights reserved.