wangzhigang1999 opened a new issue, #10024:
URL: https://github.com/apache/paimon/issues/10024
### Search before asking
- [x] I searched existing issues and pull requests and found no similar
report.
### Motivation
When reading code that uses `CatalogFactory.create()`, I cannot follow the
returned table through IDE completion and go-to-definition:
```python
from pypaimon.catalog.catalog_factory import CatalogFactory
catalog = CatalogFactory.create({"warehouse": "/tmp/warehouse"})
table = catalog.get_table("db.table")
read_builder = table.new_read_builder()
```
On `master` at `10cf6ebc7`, Pyright reports `Unknown` for `table` and
`read_builder`. `Catalog.get_table()` declares `'Table'` as its return type,
but the module does not import `Table`. The annotations for `Database` and
`TableQueryAuthResult` have the same problem. Other catalog methods omit
parameter or return annotations, including snapshot, partition and tag
operations.
### Solution
Add the missing type imports and annotations to the `Catalog` API, and align
the corresponding methods in the filesystem, JDBC and REST implementations.
Keep the optional database-property type consistent through the REST API and
request object.
The scope is the catalog API and its implementation signatures. This should
let callers follow the existing table and builder APIs through static type
information.
### Are you willing to submit a PR?
- [x] I am willing to submit a PR.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]