Skip to content

Commit

Permalink
Record that the result of DictionaryBlock#copyPositions is compact
Browse files Browse the repository at this point in the history
  • Loading branch information
pettyjamesm committed Mar 9, 2022
1 parent 4871cee commit 0280165
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,11 @@ public Block copyPositions(int[] positions, int offset, int length)
}
newIds[i] = oldIndexToNewIndex.get(oldIndex);
}
return new DictionaryBlock(dictionary.copyPositions(positionsToCopy.elements(), 0, positionsToCopy.size()), newIds);
return new DictionaryBlock(
length,
dictionary.copyPositions(positionsToCopy.elements(), 0, positionsToCopy.size()),
newIds,
true); // new dictionary is compact
}

@Override
Expand Down

0 comments on commit 0280165

Please sign in to comment.