mirror of
https://github.com/lancedb/lancedb.git
synced 2026-08-18 12:08:35 +00:00
e40e073a9d
Declaring a computed column stores its expression but computes nothing, so
until now the column stayed null with no way to fill it. refresh_column
evaluates the expression over the rows that still hold no value and commits the
results:
table.refresh_column("doubled").await?
Rows without a value are the ones to fill, which also makes the operation
idempotent and resumable after a failure: refreshing again picks up whatever
did not land. A row whose expression evaluates to null is indistinguishable
from an unfilled one and is recomputed, which costs work but cannot change the
result.
Values written after a refresh are reachable by the next one, which is the case
that matters -- an expression column populated once and then appended to would
otherwise read null for every later row forever.