You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have no idea when this bug sneaked up, since I haven't really updated my version for 6 months, since you originally implemented the vector_full_scan_stream function. However, it's ordering things completely bananas now. You can see in the screenshot an example. This is the result of executing the following SQL;
selectvss.distance, ts.id, ts.created, ts.type, ts.pushed, ts.uri, ts.prompt, ts.completion, ts.filename, ts.cached, ts.meta, ts.embeddingsas embedding_vss
from ml_training_snippets ts
inner join vector_full_scan_stream('ml_training_snippets', 'embeddings', vector_as_f32(@embedding)) as vss onvss.rowid=ts.idwhere1and type = @type order byvss.distancelimit10
I suspect if you start from the point of the implementation of the vector_full_scan_stream function, and track forward, you'll find something that broke the vector_full_scan_stream function ...
The only thing I did was to update to the latest binaries ...
Thank you very much, @polterguy, for reporting the issue.
This was caused by my recent refactoring, where the streaming and non-streaming interfaces now use the same function, but the ORDER BY index was calculated incorrectly.
The problem is now fixed with bfda256, and a new test has been added to the unit tests.
Psst, sorry for going off topic, but what can I expect out of the latest version of improvements? I haven't really been following your stuff since you implemented the full scan functions ...
@polterguy so many changes: a major code refactoring, several issues fixed, several optimizations implemented, and support for 1-bit quantization added. Even if you do not need quantization, I strongly recommend using the latest version.
Psst, you need to test my stuff one of these days - Fully functioning Docker images now. I've got a video where I'm creating my first app in less than 5 minutes ...
Activity
polterguy commentedon Feb 20, 2026
The exact same codebase produces this ordering using the old lib ...
... which is the correct result ...
fix(vtab): streaming mode ignored ORDER BY due to wrong orderByConsum…
marcobambini commentedon Feb 21, 2026
Thank you very much, @polterguy, for reporting the issue.
This was caused by my recent refactoring, where the streaming and non-streaming interfaces now use the same function, but the ORDER BY index was calculated incorrectly.
The problem is now fixed with bfda256, and a new test has been added to the unit tests.
Please upgrade to the latest 0.9.91 version.
polterguy commentedon Feb 21, 2026
Dude, you're officially now my favourite open source project maintainer! But you knew you've been that for a long time I presume ... ;)
polterguy commentedon Feb 21, 2026
You're a champion! I can confirm, bug is gone!!
Psst, sorry for going off topic, but what can I expect out of the latest version of improvements? I haven't really been following your stuff since you implemented the full scan functions ...
marcobambini commentedon Feb 21, 2026
@polterguy so many changes: a major code refactoring, several issues fixed, several optimizations implemented, and support for 1-bit quantization added. Even if you do not need quantization, I strongly recommend using the latest version.
polterguy commentedon Feb 21, 2026
I'm committing and rebuilding now ... ;)
Psst, you need to test my stuff one of these days - Fully functioning Docker images now. I've got a video where I'm creating my first app in less than 5 minutes ...
https://www.youtube.com/watch?v=k6eSKxc6oM8
marcobambini commentedon Feb 21, 2026
@polterguy, that is really impressive, you should teach me how to develop something like that :-)