qdrant / qdrant/rust-client

Inconsistent optional point ID type in scroll response

Open
#243 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
415
Forks
83
Avg merge
2h 20m
Merged PRs (30d)
3

Description

Why is returned point ID for scroll an Option? Is it safe to unwrap?

Python client type does not have None variant:
https://github.com/qdrant/qdrant-client/blob/981117a506b549e9dcd51cd633d4a6162df3b05f/qdrant_client/async_qdrant_client.py#L1371
->
https://github.com/qdrant/qdrant-client/blob/981117a506b549e9dcd51cd633d4a6162df3b05f/qdrant_client/conversions/common_types.py#L96
->
https://github.com/qdrant/qdrant-client/blob/981117a506b549e9dcd51cd633d4a6162df3b05f/qdrant_client/http/models/models.py#L2219
->
https://github.com/qdrant/qdrant-client/blob/981117a506b549e9dcd51cd633d4a6162df3b05f/qdrant_client/http/models/models.py#L3472-L3475

ExtendedPointId = Union[
    StrictInt,
    StrictStr,
]

Meanwhile rust:
https://github.com/qdrant/rust-client/blob/9feb73ee7289c11d9bf0db8cf369e680d48d0643/src/qdrant_client/points.rs#L227

The next parts are autogenerated i think

    #[prost(message, repeated, tag = "2")]
    pub result: ::prost::alloc::vec::Vec<RetrievedPoint>,
pub struct RetrievedPoint {
    #[prost(message, optional, tag = "1")]
    pub id: ::core::option::Option<PointId>,

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with src/qdrant_client/points.rs at the RetrievedPoint definition and compare its optional PointId field with the linked Python client models and scroll response types. Check whether the generated Rust type reflects the API contract and whether unwrapping is safe. Done means the optional-ID behavior is resolved and the Rust and Python client representations are consistent or clearly documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.