Skip to content

Commit eb08f57

Browse files
Fix NPE
1 parent df298e5 commit eb08f57

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/lucene/ValuesSourceReaderOperator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ private record RowStrideReaderWork(BlockLoader.RowStrideReader reader, Block.Bui
516516
implements
517517
Releasable {
518518
void read(int doc, BlockLoaderStoredFieldsFromLeafLoader storedFields) throws IOException {
519-
int size = storedFields.source().internalSourceRef().length();
519+
int size = storedFields.source() == null ? -1 : storedFields.source().internalSourceRef().length();
520520
if (size > 500_000 && builder instanceof AbstractBlockBuilder ab) {
521521
// accounting for twice the source size, one for the binary, one for the map
522522
ab.adjustBreaker(size * 2);

0 commit comments

Comments
 (0)