lance-format/lance

Python: fix broken fragment APIs

Open

#1006 aperta il 22 giu 2023

Vedi su GitHub
 (0 commenti) (0 reazioni) (1 assegnatario)Rust (695 fork)github user discovery
A-pythongood first issue

Metriche repository

Star
 (6582 star)
Metriche merge PR
 (Merge medio 6g 1h) (219 PR mergiate in 30 g)

Descrizione

The APIs around getting and manipulating fragments are inconsistent with their return types.

In many cases, the type hint is wrong. For example, LanceFragment.create() claims to return LanceFragment (which would make sense), but instead returns _FragmentMetadata. Also odd that _FragmentMetadata has an underscore even though it is part of a public API.

We should refactor this to be consistent. Would also be nice to start enforcing the type hints with mypy.

Guida contributor