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 @@ -209,7 +209,7 @@ private Attribute attributeFromCache(int id) throws IOException {
209209 private void cacheAttribute (int id , Attribute attr ) {
210210 assert id >= 0 ;
211211 if (id >= attributesCache .length ) {
212- attributesCache = ArrayUtil .grow (attributesCache );
212+ attributesCache = ArrayUtil .grow (attributesCache , id + 1 );
213213 }
214214 attributesCache [id ] = attr ;
215215 }
@@ -252,7 +252,7 @@ private EsField esFieldFromCache(int id) throws IOException {
252252 private void cacheEsField (int id , EsField field ) {
253253 assert id >= 0 ;
254254 if (id >= esFieldsCache .length ) {
255- esFieldsCache = ArrayUtil .grow (esFieldsCache );
255+ esFieldsCache = ArrayUtil .grow (esFieldsCache , id + 1 );
256256 }
257257 esFieldsCache [id ] = field ;
258258 }
You can’t perform that action at this time.
0 commit comments