From 8604065adb101a44043d73b70e4c838788236a93 Mon Sep 17 00:00:00 2001 From: Nikita Sivukhin Date: Tue, 13 Aug 2024 12:11:58 +0400 Subject: [PATCH] allow any neighbor compression types --- libsql-ffi/bundled/SQLite3MultipleCiphers/src/sqlite3.c | 4 +--- libsql-ffi/bundled/src/sqlite3.c | 4 +--- libsql-sqlite3/src/vectordiskann.c | 4 +--- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/libsql-ffi/bundled/SQLite3MultipleCiphers/src/sqlite3.c b/libsql-ffi/bundled/SQLite3MultipleCiphers/src/sqlite3.c index 477758b4cc..e48ad61292 100644 --- a/libsql-ffi/bundled/SQLite3MultipleCiphers/src/sqlite3.c +++ b/libsql-ffi/bundled/SQLite3MultipleCiphers/src/sqlite3.c @@ -213594,11 +213594,9 @@ int diskAnnOpenIndex( if( compressNeighbours == 0 ){ pIndex->nEdgeVectorType = pIndex->nNodeVectorType; pIndex->nEdgeVectorSize = pIndex->nNodeVectorSize; - }else if( compressNeighbours == VECTOR_TYPE_FLOAT1BIT ){ + }else{ pIndex->nEdgeVectorType = compressNeighbours; pIndex->nEdgeVectorSize = vectorDataSize(compressNeighbours, pIndex->nVectorDims); - }else{ - return SQLITE_ERROR; } *ppIndex = pIndex; diff --git a/libsql-ffi/bundled/src/sqlite3.c b/libsql-ffi/bundled/src/sqlite3.c index 477758b4cc..e48ad61292 100644 --- a/libsql-ffi/bundled/src/sqlite3.c +++ b/libsql-ffi/bundled/src/sqlite3.c @@ -213594,11 +213594,9 @@ int diskAnnOpenIndex( if( compressNeighbours == 0 ){ pIndex->nEdgeVectorType = pIndex->nNodeVectorType; pIndex->nEdgeVectorSize = pIndex->nNodeVectorSize; - }else if( compressNeighbours == VECTOR_TYPE_FLOAT1BIT ){ + }else{ pIndex->nEdgeVectorType = compressNeighbours; pIndex->nEdgeVectorSize = vectorDataSize(compressNeighbours, pIndex->nVectorDims); - }else{ - return SQLITE_ERROR; } *ppIndex = pIndex; diff --git a/libsql-sqlite3/src/vectordiskann.c b/libsql-sqlite3/src/vectordiskann.c index c6e2d5156f..5f30806db3 100644 --- a/libsql-sqlite3/src/vectordiskann.c +++ b/libsql-sqlite3/src/vectordiskann.c @@ -1749,11 +1749,9 @@ int diskAnnOpenIndex( if( compressNeighbours == 0 ){ pIndex->nEdgeVectorType = pIndex->nNodeVectorType; pIndex->nEdgeVectorSize = pIndex->nNodeVectorSize; - }else if( compressNeighbours == VECTOR_TYPE_FLOAT1BIT ){ + }else{ pIndex->nEdgeVectorType = compressNeighbours; pIndex->nEdgeVectorSize = vectorDataSize(compressNeighbours, pIndex->nVectorDims); - }else{ - return SQLITE_ERROR; } *ppIndex = pIndex;