Repository navigation
Add table update API for ordered expressions and commit result - #81
Merged
Merged
Conversation
Expose the SDK UpdateBuilder through lancedb_table_update: ordered column/expression assignments, an optional SQL predicate, and the committed row count and version in one call. This gives the Go update paths one native operation for both literal-map and expression updates. The new result struct and entry point are additive; existing symbols and layouts stay unchanged. Empty assignments, null entries, empty column names and invalid UTF-8 are rejected as invalid arguments, while SQL errors keep the SDK diagnostics.
Document that column/expression input order is not evaluation order and that every assignment reads the row before the update. Add a public C ABI regression that swaps two distinct int32 values and reads them back, which only produces (2, 1) when the SDK evaluates all expressions against the original row. Also document that a legacy remote empty update response can report zero rows and version, so zero means unknown there.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Go migration needs one native update operation that carries column/expression assignments, an optional SQL predicate, and the affected rows and committed version in a single SDK call. Both the published literal-map
Updateand the newerUpdateExprpath can use it; literal conversion stays in Go.This adds
lancedb_table_updateandLanceDBUpdateResultwithout changing existing header signatures or ABI. Assignments are paired by index and passed in caller order, but that is not an evaluation order: every expression reads the row as it was before the update, soa=b, b=aswaps the original values. A NULL or empty predicate updates every row. Invalid structural input returnsLANCEDB_INVALID_ARGUMENT, while SQL expression errors keep their SDK diagnostics. The result comes from the SDK'sUpdateResult; on a legacy remote empty response, zero rows or version means unknown.The new public C ABI regression swaps two distinct int32 values and reads them back, which verifies the Lance 15 evaluation semantics now provided by #78 on main. It also covers filtered mutation, all-row multi-assignment, invalid expression diagnostics, invalid input, and the returned version.