databricks bug fixes (#3416)

This commit is contained in:
Josh Hayes
2025-09-05 05:52:09 -05:00
committed by GitHub
parent b27879bfd4
commit 9477184582
2 changed files with 5 additions and 4 deletions
+2 -2
View File
@@ -465,7 +465,7 @@ class Databricks(VectorStoreBase):
# Parse results
result_data = sdk_results.result if hasattr(sdk_results, "result") else sdk_results
data_array = result_data.data_array if hasattr(result_data, "data_array") else []
data_array = result_data.data_array if getattr(result_data, "data_array", None) else []
memory_results = []
for row in data_array:
@@ -708,7 +708,7 @@ class Databricks(VectorStoreBase):
pass
memory_id = row_dict.get("memory_id") or row_dict.get("id")
memory_results.append(MemoryResult(id=memory_id, payload=payload))
return memory_results
return [memory_results]
except Exception as e:
logger.error(f"Failed to list memories: {e}")
return []
+3 -2
View File
@@ -300,8 +300,9 @@ def test_list_memories(db_instance_delta, mock_workspace_client):
result=SimpleNamespace(data_array=[row])
)
res = db_instance_delta.list(limit=1)
assert len(res) == 1
assert res[0].id == "id3"
assert isinstance(res, list)
assert len(res[0]) == 1
assert res[0][0].id == "id3"
# ---------------------- Reset Tests ---------------------- #