From 9dfa43a9de9e0026189fa0a520089f871302161b Mon Sep 17 00:00:00 2001 From: Wyatt Alt Date: Tue, 16 Jun 2026 09:47:00 -0700 Subject: [PATCH] fix: sync Connection.lineage delegates to AsyncConnection.lineage self._conn on a remote sync connection is an AsyncConnection (python), which exposes `lineage` (parses the JSON), not the pyo3 `table_lineage`. The sync wrapper was calling self._conn.table_lineage -> AttributeError. Drive self._conn.lineage on the loop instead, mirroring create_materialized_view. (table_lineage stays the pyo3 method the async path calls via self._inner.) Co-Authored-By: Claude Opus 4.8 (1M context) --- python/python/lancedb/db.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/python/python/lancedb/db.py b/python/python/lancedb/db.py index bf6590f61..d7d937164 100644 --- a/python/python/lancedb/db.py +++ b/python/python/lancedb/db.py @@ -718,10 +718,11 @@ class DBConnection(EnforceOverrides): location that produced each derived column (with a drift flag). Returns a `Lineage`. `direction` is "upstream" | "downstream" | "both" (server default both); `depth` limits column-hops (transitive when omitted).""" - from .lineage import Lineage - - raw = LOOP.run(self._conn.table_lineage(table, column, direction, depth)) - return Lineage.from_json(raw) + # `self._conn` is the AsyncConnection; drive its async `lineage` + # (which parses the JSON) on the loop, mirroring create_materialized_view. + return LOOP.run( + self._conn.lineage(table, column, direction=direction, depth=depth) + ) def _refresh_materialized_view( self,