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

@@ -197,6 +197,23 @@ def test_query_sync_minimal():
assert data == expected
def test_query_sync_empty_query():
def handler(body):
assert body == {
"k": 10,
"filter": "true",
"vector": [],
"columns": ["id"],
}
return pa.table({"id": [1, 2, 3]})
with query_test_table(handler) as table:
data = table.search(None).where("true").select(["id"]).limit(10).to_list()
expected = [{"id": 1}, {"id": 2}, {"id": 3}]
assert data == expected
def test_query_sync_maximal():
def handler(body):
assert body == {