Skip to content

fix(python): check all table pages for db membership - #3395

Merged
wjones127 merged 5 commits into
lancedb:mainfrom
pragnyanramtha:codex/fix-db-membership-pagination
May 20, 2026
Merged

wjones127 merged 5 commits into
lancedb:mainfrom
pragnyanramtha:codex/fix-db-membership-pagination

Conversation

@pragnyanramtha

Copy link
Copy Markdown
Contributor

Summary

  • Fix name in db and len(db) for local Python connections with more than one page of tables.
  • Use list_tables() pagination instead of deprecated table_names() with its default 10-item page.
  • Add regression coverage with 20 tables so later pages are included.

Fixes #2727.

Validation

  • python3 -m py_compile python/python/lancedb/db.py python/python/tests/test_db.py
  • No-build Python harness that extracts and executes the edited LanceDBConnection pagination methods: passed
  • uvx ruff check python/python/lancedb/db.py python/python/tests/test_db.py
  • uvx ruff format --check python/python/lancedb/db.py python/python/tests/test_db.py

Note: uv run pytest python/tests/test_db.py::test_db_contains_and_len_include_all_table_name_pages -q was attempted first, but it stayed in the broad Rust/PyO3 native extension build and was stopped before pytest started.

@github-actions github-actions Bot added bug Something isn't working Python Python SDK labels May 17, 2026
@pragnyanramtha
pragnyanramtha marked this pull request as ready for review May 17, 2026 01:43
Copilot AI review requested due to automatic review settings May 17, 2026 01:43

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@wjones127 wjones127 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for working on this. I've identified some optional improvements you can make if you'd like. Otherwise, I'll merge in a day or two, if CI is passing.

Comment thread python/python/lancedb/db.py Resolved
Comment thread python/python/lancedb/db.py Resolved
@pragnyanramtha
pragnyanramtha requested a review from wjones127 May 20, 2026 17:19
@wjones127
wjones127 merged commit 15bd821 into lancedb:main May 20, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working Python Python SDK

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(python): Table cannot be found

3 participants