Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ readme = "README.md"
dependencies = [
"lance-namespace>=0.6.0",
"lance-namespace-urllib3-client>=0.6.0",
"pylance>=8.0.0"
"pylance>=11.0.0"
]

[dependency-groups]
Expand Down
22 changes: 12 additions & 10 deletions tests/io/lancedb/test_lancedb_scalar_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -602,8 +602,8 @@ def test_build_distributed_index_zonemap_integer_column(self, temp_dir):
index_names = [idx["name"] for idx in indices]
assert "score_zonemap_index" in index_names, f"ZONEMAP index not found in {index_names}"

def test_build_distributed_index_zonemap_invalid_string_column(self, temp_dir):
"""Test that ZONEMAP index rejects string columns via Lance."""
def test_build_distributed_index_zonemap_string_column(self, temp_dir):
"""Test that ZONEMAP index builds on string columns (supported since Lance 11)."""
data = {
"id": [1, 2, 3, 4],
"text": ["a", "b", "c", "d"],
Expand All @@ -612,14 +612,16 @@ def test_build_distributed_index_zonemap_invalid_string_column(self, temp_dir):
path = Path(temp_dir) / "zonemap_string_test.lance"
dataset.write_lance(uri=path, max_rows_per_file=2)

# ZONEMAP falls back to single-threaded Lance, which will reject
# unsupported column types at the Lance level.
with pytest.raises(Exception):
create_scalar_index(
uri=path,
column="text",
index_type="ZONEMAP",
)
# ZONEMAP falls back to single-threaded Lance index creation.
create_scalar_index(
uri=path,
column="text",
index_type="ZONEMAP",
name="text_zonemap_index",
)

index_names = [idx["name"] for idx in lance.dataset(path).list_indices()]
assert "text_zonemap_index" in index_names, f"ZONEMAP index not found in {index_names}"


class TestSegmentedBTreeIndex:
Expand Down
6 changes: 4 additions & 2 deletions tests/io/lancedb/test_lancedb_writes.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,10 @@ def test_lancedb_write_blob(lance_dataset_path):

row_ids = ds.to_table(columns=[], with_row_id=True).column("_rowid").to_pylist()
blobs = ds.take_blobs("blob", row_ids)
for expected in blobs_data:
with blobs.pop(0) as f:
assert len(blobs) == len(blobs_data)
for blob, expected in zip(blobs, blobs_data):
assert blob is not None
with blob as f:
assert f.read() == expected


Expand Down
16 changes: 8 additions & 8 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading