mirror of
https://github.com/lancedb/lancedb.git
synced 2026-07-03 11:00:40 +00:00
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) <noreply@anthropic.com>
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user