You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@paimon.apache.org by "wangzhigang1999 (via GitHub)" <gi...@apache.org> on 2026/09/20 15:25:02 UTC
[PR] [python] Improve catalog API type annotations [paimon]
wangzhigang1999 opened a new pull request, #10025:
URL: https://github.com/apache/paimon/pull/10025
### Purpose
Fixes #10024.
Callers lose static type information at `Catalog.get_table()`: Pyright reports `Unknown` for the returned table and subsequent read-builder calls because `Catalog` does not import the declared return type.
Add missing type imports and parameter/return annotations to `Catalog`, and align the filesystem, JDBC and REST implementations. Also align the optional database-property type through `RESTApi.create_database()` and `CreateDatabaseRequest`.
With these declarations, callers can resolve `Table`, read/write builders, snapshots, partitions and tags. The patch covers six files and preserves the existing operation bodies apart from moving imports to module scope.
### Tests
- 77 existing tests passed locally, covering catalog operations, tags, system-table dispatch, builders, overwrite commits and REST API parameter validation.
- Verified the calling code with Pyright and six definition lookups with Jedi. Table and builder types resolve after the change.
- Imported 12 related modules in separate Python processes and resolved all `Catalog` method annotations with `typing.get_type_hints()`.
- Verified unchanged database-request JSON for `None`, empty and populated properties. Flake8 and `git diff --check` passed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [python] Improve catalog API type annotations [paimon]
Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi merged PR #10025:
URL: https://github.com/apache/paimon/pull/10025
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org