Skip to content

chore: use Uuid type throughout index infrastructure instead of String #6347

Description

@wjones127

Several index-related types store or pass UUIDs as String/&str despite IndexMetadata.uuid already being the native Uuid type. This forces unnecessary .to_string() conversions at every callsite.

Changes, in dependency order:

  1. CreateIndexBuilder.index_uuid: Option<String>Option<Uuid> (lance/src/index/create.rs). The builder currently accepts a String and immediately calls Uuid::parse_str internally — accepting Uuid directly removes this round-trip.

  2. DatasetIndexInternalExt trait methods open_generic_index, open_scalar_index, open_vector_index — change uuid: &struuid: &Uuid (lance/src/index.rs). Every call site converts from IndexMetadata.uuid (already Uuid) via .to_string(), which would be eliminated.

  3. IVFIndex.uuid: StringUuid in both lance/src/index/vector/ivf.rs and lance/src/index/vector/ivf/v2.rs. Unblocked by Python code dump #2 above.

  4. ANNIvfPartitionExec.index_uuids: Vec<String>Vec<Uuid> (lance/src/io/exec/knn.rs). Currently built by mapping IndexMetadata.uuid.to_string(). Unblocked by Python code dump #2 above.

  5. Cache key structs in lance/src/session/index_caches.rs that use uuid: &'a str — standardize to &'a Uuid to match the one key that already uses &'a Uuid.

Activity

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