fix: handle camelCase column names in select (#1460)

Fixes #1385
This commit is contained in:
Will Jones
2024-07-22 12:53:17 -07:00
committed by GitHub
parent 391fa26175
commit 4f601a2d4c
6 changed files with 73 additions and 17 deletions

View File

@@ -345,3 +345,12 @@ def test_explain_plan(table):
async def test_explain_plan_async(table_async: AsyncTable):
plan = await table_async.query().nearest_to(pa.array([1, 2])).explain_plan(True)
assert "KNN" in plan
@pytest.mark.asyncio
async def test_query_camelcase_async(tmp_path):
db = await lancedb.connect_async(tmp_path)
table = await db.create_table("test", pa.table({"camelCase": pa.array([1, 2])}))
result = await table.query().select(["camelCase"]).to_arrow()
assert result == pa.table({"camelCase": pa.array([1, 2])})