diff --git a/python/python/lancedb/permutation.py b/python/python/lancedb/permutation.py index 9e04a0c6d..9e9096611 100644 --- a/python/python/lancedb/permutation.py +++ b/python/python/lancedb/permutation.py @@ -781,11 +781,10 @@ class Permutation: def fetch(self, indices: list[int]) -> Any: """ - Fetch rows from the permutation by offset. + Fetch rows from the permutation - This is the public batch-access API. It returns the rows for the given - offsets in the same shape as configured by - [with_format](#with_format) / [with_transform](#with_transform). + returns the rows for the given permutation in the same shape as configured by + with_format / with_transform. Examples -------- diff --git a/python/python/tests/test_permutation.py b/python/python/tests/test_permutation.py index f9b20a228..e29772f91 100644 --- a/python/python/tests/test_permutation.py +++ b/python/python/tests/test_permutation.py @@ -1098,20 +1098,5 @@ def test_getitems_invalid_offset(some_permutation: Permutation): def test_fetch_matches_getitems(some_permutation: Permutation): - """Public fetch() should be equivalent to __getitems__.""" indices = [0, 1, 2, 10, 100] assert some_permutation.fetch(indices) == some_permutation.__getitems__(indices) - - -def test_fetch_respects_format(some_permutation: Permutation): - """fetch() applies the configured format/transform.""" - arrow_perm = some_permutation.with_format("arrow") - result = arrow_perm.fetch([0, 1, 2]) - assert isinstance(result, pa.RecordBatch) - assert result.num_rows == 3 - - -def test_fetch_invalid_offset(some_permutation: Permutation): - """fetch() with an out-of-range offset raises an error.""" - with pytest.raises(Exception): - some_permutation.fetch([999999])