Skip to content

Computing vector distance functions (like vss_inner_product) incorrectly parses the data #122

@zen0wu

Description

@zen0wu

I'm dumping some raw bytes into a vector column, but when sqlite-vss parses the BLOB into a vector, it checks if it starts with a v\x01 and if so, these two bytes are treated a header.

The problem is, I have some vectors actually do start with this header (as part of the data) and now it fails to parse the data correctly.

if (header != VECTOR_BLOB_HEADER_BYTE) {
*pzErrMsg = "Blob not well-formatted vector blob";
return nullptr;
}
if (type != VECTOR_BLOB_HEADER_TYPE) {
*pzErrMsg = "Blob type not right";
return nullptr;
}

One thing I can do is to prepend the header to every row, but that feels a really bad solution and it would be great if we can fix this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions