Skip to content

Bug in latest version #43

Closed
Closed

Description

@polterguy

Hi there,

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;

select vss.distance, ts.id, ts.created, ts.type, ts.pushed, ts.uri, ts.prompt, ts.completion, ts.filename, ts.cached, ts.meta, ts.embeddings as embedding_vss
   from ml_training_snippets ts 
      inner join vector_full_scan_stream('ml_training_snippets', 'embeddings', vector_as_f32(@embedding)) as vss on vss.rowid = ts.id
   where 1 and type = @type order by vss.distance limit 10

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 ...

Image

Activity

  1. polterguy commented on Feb 20, 2026

    @polterguy
    Author

    The exact same codebase produces this ordering using the old lib ...

    ... which is the correct result ...

    Image
  2. marcobambini commented on Feb 21, 2026

    @marcobambini
    Member

    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.

  3. polterguy commented on Feb 21, 2026

    @polterguy
    Author

    Dude, you're officially now my favourite open source project maintainer! But you knew you've been that for a long time I presume ... ;)

  4. polterguy commented on Feb 21, 2026

    @polterguy
    Author

    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 ...

    Image
  5. marcobambini commented on Feb 21, 2026

    @marcobambini
    Member

    @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.

  6. polterguy commented on Feb 21, 2026

    @polterguy
    Author

    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

  7. marcobambini commented on Feb 21, 2026

    @marcobambini
    Member

    @polterguy, that is really impressive, you should teach me how to develop something like that :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions