-
Notifications
You must be signed in to change notification settings - Fork 22
[ISSUE-148] Support drop_table and list_offsets methods in python bin… #150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds two administrative operations to the Python bindings to achieve feature parity with C++ bindings: drop_table() for deleting tables and list_offsets() for querying bucket offsets. Both methods follow existing async patterns and leverage core APIs that already exist in the Rust codebase.
Changes:
- Added
Admin.drop_table()method with optionalignore_if_not_existsparameter - Added
Admin.list_offsets()method supporting earliest, latest, and timestamp-based offset queries - Introduced
OffsetTypeclass with string constants for type-safe offset type specification - Updated example.py to demonstrate both new features
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| bindings/python/src/lib.rs | Adds OffsetType class definition with string constants and registers it in the Python module |
| bindings/python/src/admin.rs | Implements drop_table() and list_offsets() admin methods with validation and error handling |
| bindings/python/example/example.py | Demonstrates usage of new methods with both string literals and OffsetType constants |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
359fbf3 to
753c060
Compare
753c060 to
ffd6c8d
Compare
|
resolved conflict |
ffd6c8d to
0b4b9c0
Compare
|
@luoyuxia PTAL 🙏 |
Adds two missing admin operations to achieve feature parity with C++ bindings:
Implementation follows existing patterns from create_table() and matches
C++ bindings logic. Both core APIs already existed in admin.rs.
Closes #148