Conversation
Expose the TableService ReadRows RPC on sync and async TableClient, mirroring bulk_upsert: a session-less unary call that takes key structures and optional column names and returns a ResultSet. Co-authored-by: Maksim Zinal <zinal@ydb.tech>
BaseTableClient is shared by the async client, so the driver call may return a coroutine. Annotate the result as Any, matching bulk_upsert. Co-authored-by: Maksim Zinal <zinal@ydb.tech>
The async path was already mocked through driver.future; add the same coverage for the unary __call__ used by the synchronous client. Co-authored-by: Maksim Zinal <zinal@ydb.tech>
Owner
Author
|
Actual PR here: ydb-platform#898 |
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.
Pull request type
What is the current behavior?
The Table Service gRPC API already exposes
ReadRows(read specified keys non-transactionally from a single table), and other language SDKs wrap it onTableClient. The Python SDK generated the protobuf stubs but did not provide a public client method, so callers had to useSELECTorread_table.Issue Number: N/A
What is the new behavior?
Adds
TableClient.read_rows(sync and async, plusasync_read_rowson the sync client) as a session-less unary call, following the same pattern asbulk_upsert:columnsis optional; omit it to return every column__call__andasync_read_rowsclient pathstests/table/test_table_client.pyandtests/aio/test_table_client.pyexercise create/upsert/read/column projection/missing table, matching otherTableClientmethodsOther information
This is a public API extension only; existing methods are unchanged.
Checked locally:
tox -e black,tox -e style,tox -e mypy,tox -e py -- ydb -v(223 passed), andsphinx-build -b html docs docs/_build/html -q(no new errors). Docker was not available in this environment, so the new integration tests were not executed against a live YDB.