Skip to content

Commit 22c770b

Browse files
authored
Fix IOOBE in BigArrayVectorTests (elastic#113779)
1 parent 5c840f7 commit 22c770b

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

x-pack/plugin/esql/compute/src/test/java/org/elasticsearch/compute/data/BigArrayVectorTests.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ public void testBoolean() throws IOException {
6464
if (positionCount > 1) {
6565
assertLookup(
6666
vector.asBlock(),
67-
positions(blockFactory, 1, 2, new int[] { 1, 2 }),
68-
List.of(List.of(values[1]), List.of(values[2]), List.of(values[1], values[2]))
67+
positions(blockFactory, 0, 1, new int[] { 0, 1 }),
68+
List.of(List.of(values[0]), List.of(values[1]), List.of(values[0], values[1]))
6969
);
7070
}
7171
assertLookup(vector.asBlock(), positions(blockFactory, positionCount + 1000), singletonList(null));
@@ -110,8 +110,8 @@ public void testInt() throws IOException {
110110
if (positionCount > 1) {
111111
assertLookup(
112112
vector.asBlock(),
113-
positions(blockFactory, 1, 2, new int[] { 1, 2 }),
114-
List.of(List.of(values[1]), List.of(values[2]), List.of(values[1], values[2]))
113+
positions(blockFactory, 0, 1, new int[] { 0, 1 }),
114+
List.of(List.of(values[0]), List.of(values[1]), List.of(values[0], values[1]))
115115
);
116116
}
117117
assertLookup(vector.asBlock(), positions(blockFactory, positionCount + 1000), singletonList(null));
@@ -152,8 +152,8 @@ public void testLong() throws IOException {
152152
if (positionCount > 1) {
153153
assertLookup(
154154
vector.asBlock(),
155-
positions(blockFactory, 1, 2, new int[] { 1, 2 }),
156-
List.of(List.of(values[1]), List.of(values[2]), List.of(values[1], values[2]))
155+
positions(blockFactory, 0, 1, new int[] { 0, 1 }),
156+
List.of(List.of(values[0]), List.of(values[1]), List.of(values[0], values[1]))
157157
);
158158
}
159159
assertLookup(vector.asBlock(), positions(blockFactory, positionCount + 1000), singletonList(null));
@@ -192,8 +192,8 @@ public void testDouble() throws IOException {
192192
if (positionCount > 1) {
193193
assertLookup(
194194
vector.asBlock(),
195-
positions(blockFactory, 1, 2, new int[] { 1, 2 }),
196-
List.of(List.of(values[1]), List.of(values[2]), List.of(values[1], values[2]))
195+
positions(blockFactory, 0, 1, new int[] { 0, 1 }),
196+
List.of(List.of(values[0]), List.of(values[1]), List.of(values[0], values[1]))
197197
);
198198
}
199199
assertLookup(vector.asBlock(), positions(blockFactory, positionCount + 1000), singletonList(null));

0 commit comments

Comments
 (0)