Files
milvus/internal
Spade AandGitHub 282329caab fix: handle nullable vector array offsets by logical rows (#50480)
issue: https://github.com/milvus-io/milvus/issues/50461
ref: https://github.com/milvus-io/milvus/issues/42148

Issue: nullable VectorArray chunks store non-null rows in a compact
physical layout, so logical row indexes can diverge from physical row
indexes when missing/null rows exist. Some access paths use
logical-to-physical translation when reading the vector-array data, but
the offsets returned by VectorArrayOffsets() were still indexed by the
compact physical layout. Sealed segment vector search used logical row
indexes to read those offsets directly, without applying the same
logical-to-physical translation. This could make it read the wrong row
span or read past the valid offsets range, resulting in empty search
results or std::bad_alloc.

Fix: build VectorArrayChunk offsets by logical row count instead of
physical row count. The offsets array now has row_nums + 1 entries and
can be indexed directly by logical row id. Null rows and empty rows both
have a zero-length span, while the existing Chunk valid bitmap preserves
the distinction between null and non-null empty rows.

Signed-off-by: SpadeA <tangchenjie1210@gmail.com>
2026-06-12 11:12:20 +08:00
..