Skip to content

fix: Return error instead of panicking when window rows/range is not a range#5603

Merged
max-sixty merged 1 commit intoPRQL:mainfrom
max-sixty:panic
Dec 10, 2025
Merged

fix: Return error instead of panicking when window rows/range is not a range#5603
max-sixty merged 1 commit intoPRQL:mainfrom
max-sixty:panic

Conversation

@max-sixty
Copy link
Copy Markdown
Member

Summary

  • Fixes Panic: from t | group sid (window rows:2 (sid)) #5601 - The compiler panicked when window rows:2 was used instead of a range like rows:0..2
  • Changed .unwrap() calls to proper error handling with user-friendly error messages
  • Now produces a clear error: parameter 'rows' expected a range, but found 2

Test plan

  • Added regression tests for both rows and range parameters
  • Ran task test-all locally - all tests pass

🤖 Generated with Claude Code

…a range

Fixes PRQL#5601

When the `rows` or `range` parameter of `window` receives a non-range value
(e.g., `rows:2` instead of `rows:0..2`), the compiler now returns a helpful
error message instead of panicking.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@max-sixty max-sixty merged commit b957950 into PRQL:main Dec 10, 2025
35 checks passed
@max-sixty max-sixty deleted the panic branch December 10, 2025 18:34
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.

Panic: from t | group sid (window rows:2 (sid))

1 participant