Add describe_system_view to table client - #868
Merged
Merged
Conversation
Implement TableClient.describe_system_view (sync and async), a stateless TableService RPC that returns a new SystemViewSchemeEntry with the system view id, name, columns, primary key and attributes.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #868 +/- ##
==========================================
+ Coverage 82.28% 82.33% +0.05%
==========================================
Files 99 99
Lines 12724 12749 +25
Branches 1242 1242
==========================================
+ Hits 10470 10497 +27
+ Misses 1800 1798 -2
Partials 454 454
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Adds first-class support for describing YDB system views via the dedicated TableService.DescribeSystemView RPC, exposing it as a new TableClient.describe_system_view API (sync and async) that returns a new SystemViewSchemeEntry.
Changes:
- Add
describe_system_viewto the sync/async table clients and wire it to the statelessDescribeSystemViewRPC (no session pool). - Introduce
SystemViewSchemeEntryand response/request wrapping in_session_impl. - Add unit + integration tests (sync + async) and a CHANGELOG entry.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| ydb/table.py | Adds describe_system_view and introduces SystemViewSchemeEntry used to represent system view schema. |
| ydb/table_test.py | Adds unit tests for request factory and response wrapper behavior (success + error). |
| ydb/aio/table.py | Adds async describe_system_view wrapper for the aio table client. |
| ydb/_session_impl.py | Implements request factory and response wrapper for DescribeSystemView. |
| ydb/_apis.py | Registers DescribeSystemView method name constant for the table service. |
| tests/table/test_table_client.py | Adds sync integration test covering success and SchemeError on missing view. |
| tests/aio/test_table_client.py | Adds async integration test covering success and SchemeError on missing view. |
| CHANGELOG.md | Documents the new public API addition. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Store SystemViewSchemeEntry.attributes as the protobuf map like TableSchemeEntry (consistency), and document describe_system_view / SystemViewSchemeEntry in docs/table.rst and docs/apireference.rst.
Member
Author
|
Addressed both review comments in a2d20e4:
|
The sync client's async_describe_system_view was the one patch line left uncovered; exercise it with a fake driver.
alex268
approved these changes
Jul 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #744.
Adds
TableClient.describe_system_view(sync and async) — a statelessTableService.DescribeSystemViewRPC that returns a full description of a system view through a newSystemViewSchemeEntry(system view id, name, columns, primary key, attributes). TheDescribeTable*messages are deprecated for system views, so this provides the dedicated description.The proto is already present in the vendored stubs. The RPC carries no session id, so it goes directly through the driver like
bulk_upsert(no session pool).Verified end-to-end against a trunk YDB (every
/local/.sys/*view describes correctly, missing paths raiseSchemeError); unit tests plus sync and async integration tests added.