From 1265f3e55499a70a3493321f244cfe479ea52bc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Cea=20Fontenla?= Date: Wed, 11 Dec 2024 11:16:52 +0100 Subject: [PATCH] Added extra javadocs on getKeys and nonEmpty in BlockHash (#118357) --- .../compute/aggregation/blockhash/BlockHash.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/blockhash/BlockHash.java b/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/blockhash/BlockHash.java index 30afa7ae3128d..9b53e6558f4db 100644 --- a/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/blockhash/BlockHash.java +++ b/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/blockhash/BlockHash.java @@ -91,6 +91,9 @@ public abstract class BlockHash implements Releasable, SeenGroupIds { /** * Returns a {@link Block} that contains all the keys that are inserted by {@link #add}. + *

+ * Keys must be in the same order as the IDs returned by {@link #nonEmpty()}. + *

*/ public abstract Block[] getKeys(); @@ -100,6 +103,9 @@ public abstract class BlockHash implements Releasable, SeenGroupIds { * {@link BooleanBlockHash} does this by always assigning {@code false} to {@code 0} * and {@code true} to {@code 1}. It's only after collection when we * know if there actually were any {@code true} or {@code false} values received. + *

+ * IDs must be in the same order as the keys returned by {@link #getKeys()}. + *

*/ public abstract IntVector nonEmpty();