fix: make computed columns explicitly local-only

Both operations were advertised on remote tables and neither could work. A
declaration reaches the wire as AllNulls, which RemoteTable::add_columns does
not accept, and refresh_column fell through to the BaseTable default; the
TypeScript wrapper reached the same surface. Callers got errors that named
neither the feature nor the reason.

The remote protocol has no representation for a stored expression, and what
one should look like is not settled -- the server persists a declaration under
a different vocabulary. So this states the boundary rather than guessing at a
wire format: an explicit AllNulls arm, a default that names computed columns,
and NotImplementedError raised in Python before the round trip.
This commit is contained in:
Wyatt Alt
2026-08-12 19:11:21 -07:00
parent c3efc320a6
commit 79e9dffd06
3 changed files with 64 additions and 4 deletions
+6 -2
View File
@@ -964,10 +964,14 @@ class RemoteTable(Table):
*,
computed: Dict[str, str] | None = None,
) -> AddColumnsResult:
return LOOP.run(self._table.add_columns(transforms, computed=computed))
if computed:
raise NotImplementedError(
"computed columns are supported only on local tables"
)
return LOOP.run(self._table.add_columns(transforms))
def refresh_column(self, column: str):
return LOOP.run(self._table.refresh_column(column))
raise NotImplementedError("computed columns are supported only on local tables")
def alter_columns(
self, *alterations: Iterable[Dict[str, str]]