File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -301,8 +301,8 @@ $endif$
301301 }
302302
303303 /*
304- * Total the sign selected groups and turn them into a running count.
305- * Negative counts are still unselected .
304+ * Total the selected groups and turn them into a running count.
305+ * Unselected groups will still have negative counts .
306306 */
307307 int total = 0;
308308 for (int s = 0; s < selected.getPositionCount(); s++) {
@@ -317,6 +317,8 @@ $endif$
317317 * Build a list of ids to insert in order *and* convert the running
318318 * count in selectedCounts[group] into the end index in ids for each
319319 * group.
320+ * Here we use the negative counts to signal that a group hasn't been
321+ * selected and the id containing values for that group is ignored.
320322 */
321323 idsSize = RamUsageEstimator.alignObjectSize(RamUsageEstimator.NUM_BYTES_ARRAY_HEADER + total * Integer.BYTES);
322324 blockFactory.adjustBreaker(idsSize);
You can’t perform that action at this time.
0 commit comments