Skip to content

Commit 5d256fa

Browse files
committed
Merge branch 'topn_partition' of https://github.com/przemekwitek/elasticsearch into topn_partition
2 parents d0c1768 + b697e8a commit 5d256fa

File tree

1 file changed

+1
-4
lines changed
  • x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/operator/topn

1 file changed

+1
-4
lines changed

x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/operator/topn/TopNOperator.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -605,10 +605,7 @@ public long ramBytesUsed() {
605605
size += partitions.size() * Partition.SHALLOW_SIZE;
606606
size += RamUsageEstimator.alignObjectSize(arrHeader + ref * sortOrders.size());
607607
size += sortOrders.size() * SortOrder.SHALLOW_SIZE;
608-
long ramBytesUsedSum = inputQueues.entrySet()
609-
.stream()
610-
.mapToLong(e -> e.getKey().length + e.getValue().ramBytesUsed())
611-
.sum();
608+
long ramBytesUsedSum = inputQueues.entrySet().stream().mapToLong(e -> e.getKey().bytes.length + e.getValue().ramBytesUsed()).sum();
612609
size += ramBytesUsedSum;
613610
return size;
614611
}

0 commit comments

Comments
 (0)