You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
server: polars paging has no row-order tie-break; /load doesn't accept row_order_column (polars side of #974) #995
handle_infinite_request_buckaroo_polars sorts on the one requested column, filtered_df.with_row_index().sort(col, descending=...) (buckaroo/server/data_loading_polars.py:138), with polars' default maintain_order=False. Polars doesn't define the order of rows with equal keys in that mode, and /load gives the host no way to name a column to break ties.
This is the polars side of #974. tallyman sends row_order_column on /load_expr for it (the xorq path doesn't read it yet either); /load doesn't accept it.
I haven't seen it produce different pages. A sort on a 200-value column over 1.2M rows returned the same 50-row window at offset 600,000 on five calls. The gap is that the order among ties isn't defined, so a host can't promise it, and it can differ from the order the xorq path will use once #974 is fixed.
Impact
tallyman writes a __row_order column (no ties, file order) into every parquet it hands the grid, and defines a page as ordered by the user's sort key and then __row_order, so the same request returns the same rows.
Suggested fix
/load accepts row_order_column and stores it on the session.
With a sort, order by [sort_col, row_order_column]; without one, by row_order_column (with the sampling fixed this is already file order for tallyman's files).
Without the hint, maintain_order=True at least keeps ties in input order.
Context
Found while checking whether tallyman's grid can move from /load_expr to /load with backend: "polars", on buckaroo 0.15.8 (same code on main at 992fdb3).
Activity
fix(server): break polars sort ties by row index so paging is repeata…
feat(server): /load row_order_column, polars pages tie-break on it (#995
test(server): a rejected /load re-POST must leave the session untouch…
fix(server): /load validates before mutating the session (#995)