Skip to content

Adds the LanceDBIndexStats struct and the lancedb_table_index_stats() C API declaration - #35

Merged
yuvalif merged 2 commits into
lancedb:mainfrom
galsalomon66:index_stats_api
Mar 29, 2026
Merged

yuvalif merged 2 commits into
lancedb:mainfrom
galsalomon66:index_stats_api

Conversation

@galsalomon66

Copy link
Copy Markdown
Contributor

Adds the LanceDBIndexStats struct and the lancedb_table_index_stats() C API declaration. The struct exposes num_indexed_rows, num_unindexed_rows, and num_indices. The function retrieves index statistics for a named index directly from the LanceDB manifest. (that information is required for the index-rebuild)

… C API declaration. The struct exposes num_indexed_rows, num_unindexed_rows, and num_indices. The function retrieves index statistics for a named index directly from the LanceDB manifest. (that information is required for the index-rebuild)

Signed-off-by: gal salomon <[email protected]>
@yuvalif
yuvalif self-requested a review March 28, 2026 14:37
- Get stats for a scalar index - verifies 100 indexed rows, 0 unindexed after creation
- Stats reflect unindexed rows after adding data - verifies 100 indexed + 50 unindexed after adding rows post-index
- Stats for non-existent index returns INDEX_NOT_FOUND
- Stats with null table returns INVALID_ARGUMENT

Signed-off-by: gal salomon <[email protected]>
@yuvalif
yuvalif merged commit 21038d5 into lancedb:main Mar 29, 2026
6 checks passed
@yuvalif yuvalif mentioned this pull request Mar 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants