-
Notifications
You must be signed in to change notification settings - Fork 576
Add ability to replace/upsert in tables #11812
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Web viewer built successfully.
View image diff on kitdiff. Note: This comment is updated whenever you push a commit. |
d77ed28 to
bf729fa
Compare
bf729fa to
bfbe562
Compare
|
@rerun-bot full-check |
|
Started a full build: https://github.com/rerun-io/rerun/actions/runs/19371068817 |
| } | ||
| InsertOp::Replace => { | ||
| exec_err!("Invalid insert operation. Only append and overwrite are supported.")?; | ||
| let key_columns: Vec<_> = dataset |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If key_columns is empty and/or disjoint with reader.schema(), should we / do we get an error?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, you get the error A merge insert operation must specify at least one on key
Related
Closes https://linear.app/rerun/project/add-ability-to-upsert-data-in-tables-aad5989947ac
What
This PR follows up on the work from #11694 and the issues linked inside it.
With this PR you can update existing tables if they have an index specified as a primary key. You do this by setting the metadata
rerun:is_table_indexon the field when creating the table. Duringupdateoperations we will use these columns as the keys by which we update the underlying lance table.