File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/io/stream Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change
1
+ pr : 114116
2
+ summary : " ES|QL: Ensure minimum capacity for `PlanStreamInput` caches"
3
+ area : ES|QL
4
+ type : bug
5
+ issues : []
Original file line number Diff line number Diff line change @@ -255,7 +255,7 @@ private Attribute attributeFromCache(int id) throws IOException {
255
255
private void cacheAttribute (int id , Attribute attr ) {
256
256
assert id >= 0 ;
257
257
if (id >= attributesCache .length ) {
258
- attributesCache = ArrayUtil .grow (attributesCache );
258
+ attributesCache = ArrayUtil .grow (attributesCache , id + 1 );
259
259
}
260
260
attributesCache [id ] = attr ;
261
261
}
@@ -297,7 +297,7 @@ private EsField esFieldFromCache(int id) throws IOException {
297
297
private void cacheEsField (int id , EsField field ) {
298
298
assert id >= 0 ;
299
299
if (id >= esFieldsCache .length ) {
300
- esFieldsCache = ArrayUtil .grow (esFieldsCache );
300
+ esFieldsCache = ArrayUtil .grow (esFieldsCache , id + 1 );
301
301
}
302
302
esFieldsCache [id ] = field ;
303
303
}
You can’t perform that action at this time.
0 commit comments