Skip to content

Fix orderBy with desc/asc column specs in Robin plan executor#478

Merged
eddiethedean merged 2 commits intov4.0.0from
fix/468-orderby-desc-asc
Feb 12, 2026
Merged

Fix orderBy with desc/asc column specs in Robin plan executor#478
eddiethedean merged 2 commits intov4.0.0from
fix/468-orderby-desc-asc

Conversation

@eddiethedean
Copy link
Owner

Closes #468

Summary

The plan executor only accepted {"col": name} for orderBy columns and raised when it received {"op": "desc", "left": {"col": "salary"}} from F.col("salary").desc().

Changes

  • In plan_executor.py orderBy branch: for each column spec,
    • Plain ref: {"col": name} → use name and corresponding ascending from payload.
    • desc/asc: {"op": "desc"|"asc"|... , "left": {"col": name}} → use left["col"] and set ascending from op (desc, desc_nulls_last, desc_nulls_first → False; else True).
  • Build col_names and asc_list and call df.order_by(col_names, asc_list) as before.

Expected behavior

df.orderBy(F.col("salary").desc()) now sorts by salary descending when using the Robin plan path.

Made with Cursor

eddiethedean and others added 2 commits February 12, 2026 08:25
- Handle {"op": "desc"|"asc"|..., "left": {"col": name}} in orderBy payload
- Extract column name from left and set ascending from op (desc* -> False, else True)
- Keep support for plain {"col": name} with payload ascending list
- Fixes ValueError: orderBy currently supports only column references in plan

Co-authored-by: Cursor <cursoragent@cursor.com>
- Add real, executable examples and captured outputs to lazy evaluation and configuration guides
- Extend Robin plan executor tests to cover orderBy with desc/asc and mixed specs
- Refresh full failure classification notes from latest Robin backend test run

Co-authored-by: Cursor <cursoragent@cursor.com>
@eddiethedean eddiethedean merged commit c88c42d into v4.0.0 Feb 12, 2026
@eddiethedean eddiethedean deleted the fix/468-orderby-desc-asc branch February 12, 2026 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant