Skip to content

Window + alias and window + arithmetic in Robin select/withColumn (#471)#481

Merged
eddiethedean merged 1 commit intov4.0.0from
fix/471-window-alias-arithmetic
Feb 12, 2026
Merged

Window + alias and window + arithmetic in Robin select/withColumn (#471)#481
eddiethedean merged 1 commit intov4.0.0from
fix/471-window-alias-arithmetic

Conversation

@eddiethedean
Copy link
Owner

Fixes #471.

In _expression_to_robin, when building left/right for arithmetic (+, -, *, /, %), treat scalar operands as F.lit(...) so that window_expr + 10 becomes a single Robin expression instead of failing with "not found: Column 'row_plus_10'".

  • Window + scalar: row_number().over(w) + 10 now translates to one Robin Column.
  • Alias: (row_number().over(w)).alias("rn") already worked; added test.
  • Added Robin backend tests: test_window_plus_literal_robin, test_window_alias_robin.

Made with Cursor

- In _expression_to_robin, when combining left/right for +,-,*,/, treat scalar
  operands as F.lit(...) so window_expr + 10 becomes one Robin expression.
- Add Robin tests: window_plus_literal_robin, window_alias_robin.

Co-authored-by: Cursor <cursoragent@cursor.com>
@eddiethedean eddiethedean merged commit b379546 into v4.0.0 Feb 12, 2026
5 of 6 checks passed
@eddiethedean eddiethedean deleted the fix/471-window-alias-arithmetic branch February 12, 2026 15:42
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