Skip to content

feat: enrich IndexContent with describe_indices metadata#349

Open
wjones127 wants to merge 2 commits into
lance-format:mainfrom
wjones127:enrich-index-content
Open

feat: enrich IndexContent with describe_indices metadata#349
wjones127 wants to merge 2 commits into
lance-format:mainfrom
wjones127:enrich-index-content

Conversation

@wjones127
Copy link
Copy Markdown
Contributor

ListTableIndices returns IndexContent with only index_name, index_uuid, columns, and status. Consumers needing an index's type, size, or row count had to follow up with one DescribeTableIndexStats call per index — an N+1.

This adds the metadata that describe_indices exposes cheaply from the manifest to IndexContent:

Field Type Notes
index_type string friendly type, e.g. IVF_PQ, BTREE
type_url string protobuf type URL
num_indexed_rows int64 approximate; may include deleted rows
size_bytes int64, nullable total across segments; null pre file-size tracking
num_segments int32 number of index deltas/segments
created_at date-time, nullable min across segments; null for legacy indices
index_version int32 on-disk index format version
index_details string (opaque JSON), nullable type-specific details

All fields are optional for backwards compatibility with older servers. The rust, python, and java clients are regenerated from the updated spec.

Server implementations populate the new fields in a follow-up (lance-format/lance#7101).

Closes #348

ListTableIndices returns IndexContent with only index_name, index_uuid,
columns, and status. Consumers needing an index's type, size, or row count
had to follow up with one DescribeTableIndexStats call per index — an N+1.

Add the metadata that describe_indices exposes cheaply from the manifest to
IndexContent: index_type, type_url, num_indexed_rows, size_bytes,
num_segments, created_at, index_version, and index_details. All fields are
optional for backwards compatibility with older servers.

Regenerate the rust, python, and java clients from the updated spec.

Closes lance-format#348
Comment thread docs/src/spec.yaml Outdated
Comment thread docs/src/spec.yaml
Comment on lines +3245 to +3249
num_segments:
type: integer
format: int32
minimum: 0
description: Number of index deltas/segments.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note: I'm undecided whether we should replace this with a list of segments. Open to thoughts on that.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One thought is that we can always add segment-level data layer. Not much harm in having the count and the list in here, even if it would be somewhat redundant.

Comment thread docs/src/spec.yaml Outdated
Address review feedback: num_indexed_rows counts live rows (deletes
excluded), and created_at is simply the index creation time.
@wjones127 wjones127 marked this pull request as ready for review June 4, 2026 21:37
@wjones127
Copy link
Copy Markdown
Contributor Author

I'm not sure if this needs a vote (think it does) but posting for initial comment now. The main question I have: does just exposing num_segments make sense? Or should I expose the full segment-level information from describe_indices through here?

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

Labels

enhancement New feature or request java Java features python Python features rust Rust features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: enrich IndexContent with describe_indices metadata in ListTableIndices

1 participant