Skip to content

Commit f0349f4

Browse files
committed
Remove fixed TO-DOs
1 parent 2b1f868 commit f0349f4

File tree

1 file changed

+2
-5
lines changed
  • x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/blockhash

1 file changed

+2
-5
lines changed

x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/blockhash/LongTopNBlockHash.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,7 @@ final class LongTopNBlockHash extends BlockHash {
4848
*/
4949
private boolean hasNull;
5050

51-
// TODO: package-private instead of public?
52-
public LongTopNBlockHash(int channel, boolean asc, boolean nullsFirst, int limit, BlockFactory blockFactory) {
51+
LongTopNBlockHash(int channel, boolean asc, boolean nullsFirst, int limit, BlockFactory blockFactory) {
5352
super(blockFactory);
5453
this.channel = channel;
5554
this.asc = asc;
@@ -272,7 +271,6 @@ public IntVector nonEmpty() {
272271
int nullOffset = hasNull ? 1 : 0;
273272
final int[] ids = new int[topValues.getCount() + nullOffset];
274273
int idsIndex = nullOffset;
275-
// TODO: Can we instead iterate the top and take the ids from the hash? To avoid checking unused values
276274
for (int i = 1; i < hash.size() + 1; i++) {
277275
long value = hash.get(i - 1);
278276
if (isInTop(value)) {
@@ -284,11 +282,10 @@ public IntVector nonEmpty() {
284282

285283
@Override
286284
public BitArray seenGroupIds(BigArrays bigArrays) {
287-
BitArray seenGroups = new BitArray(111, bigArrays);
285+
BitArray seenGroups = new BitArray(1, bigArrays);
288286
if (hasNull) {
289287
seenGroups.set(0);
290288
}
291-
// TODO: Can we instead iterate the top and take the ids from the hash? To avoid checking unused values
292289
for (int i = 1; i < hash.size() + 1; i++) {
293290
long value = hash.get(i - 1);
294291
if (isInTop(value)) {

0 commit comments

Comments
 (0)