Skip to content

Add group_by and filter evictions to on_remove - #3281

Merged
texodus merged 3 commits into
masterfrom
on-remove-2
Nov 8, 2026
Merged

texodus merged 3 commits into
masterfrom
on-remove-2

Conversation

@texodus

@texodus texodus commented Nov 8, 2026

Copy link
Copy Markdown
Member

This PR updates the View::on_remove event handler registration to tick rows that were removed form the View due to group_by groups becoming empty, as well as filter conditions removing them. This change allows Perspective' client-server replicated deployment to be a closer duplication, though it still does not handle live column eviction due to split_by groups becoming empty (this still requires an explicit schema on the Table at construction). on_remove's callback itself now has an second argument which marks the source of the removal - "filter", "group" and "key" types. For Python, this PR also makes this signature and on_update's recent callback signature update optional (via inspect, so may not work with e.g. pyo3 bindings directly) but you will still get the new events if you do not register this.

In addition, updates on the on_update callback for grouped Views now also emit the group_by rows, and Tables derived from these will use the group_by columns as index by default. Together, client.able(view) constructions should now be symmetric (mod split_by note above).

Drivebys

Signed-off-by: Andrew Stein <steinlink@gmail.com>
Signed-off-by: Andrew Stein <steinlink@gmail.com>
Signed-off-by: Andrew Stein <steinlink@gmail.com>
@texodus texodus added enhancement Feature requests or improvements breaking labels Nov 8, 2026
@texodus
texodus merged commit ca0898a into master Nov 8, 2026
19 checks passed
@texodus
texodus deleted the on-remove-2 branch November 8, 2026 20:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking enhancement Feature requests or improvements

1 participant