Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#29851 closed Bug (fixed)

Window Frame Doesn't Work In SubQuery

Reported by: Daniel Fuchs Owned by: Mariusz Felisiak
Component: Database layer (models, ORM) Version: 2.1
Severity: Normal Keywords: Window
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

When using a Window and frame=RowRange(start=-1, end=1), the query works fine except when it's used in a Subquery. That results in the following error:

start argument must be a negative integer, zero, or None, but got 'Value(-1)'

Attachments (1)

29851.diff (2.6 KB ) - added by Mariusz Felisiak 6 years ago.
Test.

Download all attachments as: .zip

Change History (8)

comment:1 by Daniel Fuchs, 6 years ago

Component: UncategorizedDatabase layer (models, ORM)

comment:2 by Tim Graham, 6 years ago

Triage Stage: UnreviewedAccepted

It could be useful if you provided some sample code (ideal would be a test for tests/expressions_window/tests.py).

comment:3 by Mariusz Felisiak, 6 years ago

Owner: changed from nobody to Mariusz Felisiak
Status: newassigned

by Mariusz Felisiak, 6 years ago

Attachment: 29851.diff added

Test.

comment:4 by Mariusz Felisiak, 6 years ago

Has patch: set
Keywords: Window added

comment:5 by Tim Graham, 6 years ago

Triage Stage: AcceptedReady for checkin

comment:6 by GitHub <noreply@…>, 6 years ago

Resolution: fixed
Status: assignedclosed

In dd8ed64:

Fixed #29851 -- Fixed crash of annotations with window expressions in Subquery.

comment:7 by GitHub <noreply@…>, 6 years ago

In e49ab726:

Refs #29851 -- Fixed test_subquery_row_range_rank() crash on MariaDB 10.2+.

Thanks Tom Forbes for the report.

Note: See TracTickets for help on using tickets.
Back to Top