1. 29 Sep, 2024 28 commits
  2. 26 Sep, 2024 12 commits
    • Sergey Vojtovich's avatar
      Fixed TRUNCATE TABLE against VECTOR indexes · 29cd7cd7
      Sergey Vojtovich authored
      This patch fixes only TRUNCATE by recreate variant, there seem to be no
      reasonable engine that uses TRUNCATE by handler method for testing.
      
      Reset index_cinfo so that mi_create is not confused by garbage passed via
      index_file_name and sets MY_DELETE_OLD flag.
      
      Review question: can we add a test case to make sure VECTOR index is empty
      indeed?
      29cd7cd7
    • Sergey Vojtovich's avatar
      62201e49
    • Sergey Vojtovich's avatar
      7d52fd1c
    • Sergey Vojtovich's avatar
      a4157e1f
    • Vicențiu Ciorbaru's avatar
      MDEV-32886 Vec_FromText and Vec_ToText · 5c831b4d
      Vicențiu Ciorbaru authored
      This commit introduces two utility functions meant to make working with
      vectors simpler.
      
      Vec_ToText converts a binary vector into a json array of numbers
      (floats).
      Vec_FromText takes in a json array of numbers and converts it into a
      little-endian IEEE float sequence of bytes (4 bytes per float).
      5c831b4d
    • Vicențiu Ciorbaru's avatar
      Introduce String::append_float · 58f7f257
      Vicențiu Ciorbaru authored
      This method will write out a float to a String object, keeping the
      charset of the original string.
      
      Also have Float::to_string make use of String::append_float
      58f7f257
    • Sergei Golubchik's avatar
      mhnsw: make the search less greedy · 446a7095
      Sergei Golubchik authored
      introduced a generosity factor that makes the search less greedy.
      it dramatically improves the recall by making the search a bit slower
      (for the same recall one can use half the M and smaller ef).
      
      had to add Queue::safe_push() method that removes one of the
      furthest elements (not necessarily the furthest) in the queue
      to keep it from overflowing.
      446a7095
    • Sergei Golubchik's avatar
      cleanup search_layer() · 4db6bfd7
      Sergei Golubchik authored
      to return only as many elements as needed, the caller no longer needs to
      overallocate result arrays for throwaway nodes
      4db6bfd7
    • Sergei Golubchik's avatar
      mhnsw: store coordinates in 16 bits, not 32 · b3c30521
      Sergei Golubchik authored
      use int16_t instead of floats, they're faster and smaller.
      but perform intermediate SIMD calculations with floats to avoid overflows.
      recall drop with such scheme is below 0.002, often none.
      
      int8_t would've been better but the precision loss is too big
      and recall degrades too much.
      b3c30521
    • Sergei Golubchik's avatar
      UPDATE/DELETE post-fixes · 3dea5ded
      Sergei Golubchik authored
      3dea5ded
    • Sergei Golubchik's avatar
      cleanup: prepare_for_insert() -> prepare_for_modify() · ee811514
      Sergei Golubchik authored
      make handler::prepare_for_insert() to be called to prepare
      the handler for writes, INSERT/UPDATE/DELETE.
      ee811514
    • Hugo Wen's avatar
      MDEV-33408 Initial support for vector DELETE and UPDATE · 385dc379
      Hugo Wen authored
      When the source row is deleted, mark the corresponding node in HNSW
      index by setting `tref` to null. An index is added for the `tref` in
      secondary table for faster searching of the to-be-marked nodes.
      
      The nodes marked as deleted will still be used for search, but will not
      be included in the final query results.
      
      As skipping deleted nodes and not adding deleted nodes for new-inserted
      nodes' neighbor list could impact the performance, we now only skip
      these nodes in search results.
      
      - for some reason the bitmap is not set for hlindex during the delete so
        I had to temporarily comment out one line
      
      All new code of the whole pull request, including one or several files
      that are either new files or modified ones, are contributed under the
      BSD-new license. I am contributing on behalf of my employer Amazon Web
      Services, Inc.
      385dc379