fix: don't use v2 by default on empty table (#1469)

This commit is contained in:
Weston Pace
2024-07-23 06:47:49 -07:00
committed by GitHub
parent 4f601a2d4c
commit d4aad82aec
3 changed files with 17 additions and 3 deletions

View File

@@ -552,6 +552,12 @@ async def test_create_in_v2_mode(tmp_path):
assert await is_in_v2_mode(tbl)
# Create empty table uses v1 mode by default
tbl = await db.create_table("test_empty_v2_default", data=None, schema=schema)
await tbl.add(make_table())
assert not await is_in_v2_mode(tbl)
def test_replace_index(tmp_path):
db = lancedb.connect(uri=tmp_path)