Skip to content

Commit

Permalink
fix: avoid method call and just copy doc values reference
Browse files Browse the repository at this point in the history
  • Loading branch information
salvatore-campagna committed Aug 31, 2023
1 parent 3ec037f commit 1135bfe
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ public LeafBucketCollector getLeafCollector(AggregationExecutionContext aggCtx,
if (maxOrd <= MAX_FIELD_CARDINALITY_FOR_DYNAMIC_PRUNING || numNonVisitedOrds <= MAX_TERMS_FOR_DYNAMIC_PRUNING) {
dynamicPruningAttempts++;
return new LeafBucketCollector() {
final SortedSetDocValues docValues = valuesSource.globalOrdinalsValues(aggCtx.getLeafReaderContext());
final SortedSetDocValues docValues = values;

final BitArray bits;
final CompetitiveIterator competitiveIterator;
Expand Down Expand Up @@ -268,7 +268,7 @@ public CompetitiveIterator competitiveIterator() {

bruteForce++;
return new LeafBucketCollector() {
final SortedSetDocValues docValues = valuesSource.globalOrdinalsValues(aggCtx.getLeafReaderContext());
final SortedSetDocValues docValues = values;

@Override
public void collect(int doc, long bucketOrd) throws IOException {
Expand Down

0 comments on commit 1135bfe

Please sign in to comment.