feat: support remote empty query (#1828)

Support sending empty query types to remote lancedb. also include offset
and limit, where were previously omitted.
This commit is contained in:
Rob Meng
2024-11-13 23:04:52 -05:00
committed by GitHub
parent abd75e0ead
commit b724b1a01f
4 changed files with 31 additions and 9 deletions

View File

@@ -892,10 +892,15 @@ def test_empty_query(db):
table = LanceTable.create(db, "my_table2", data=[{"id": i} for i in range(100)])
df = table.search().select(["id"]).to_pandas()
assert len(df) == 10
# None is the same as default
df = table.search().select(["id"]).limit(None).to_pandas()
assert len(df) == 100
assert len(df) == 10
# invalid limist is the same as None, wihch is the same as default
df = table.search().select(["id"]).limit(-1).to_pandas()
assert len(df) == 100
assert len(df) == 10
# valid limit should work
df = table.search().select(["id"]).limit(42).to_pandas()
assert len(df) == 42
def test_search_with_schema_inf_single_vector(db):