[MDEV-9911] NTILE must return an error when parameter is not stable Created: 2016-04-13 Updated: 2020-07-28 Resolved: 2020-07-28 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Optimizer - Window functions, Server |
| Affects Version/s: | N/A |
| Fix Version/s: | 10.2.33 |
| Type: | Bug | Priority: | Major |
| Reporter: | Vicențiu Ciorbaru | Assignee: | Anel Husakovic |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | beginner-friendly | ||
| Issue Links: |
|
||||||||
| Sprint: | 10.2.6-2, 10.2.6-3 | ||||||||
| Description |
|
Ntile must only work for deterministic cases. If we have a query such as
n must provide a stable value for every individual partition, or we should return an error. Currently we compute
, given the current row number in the partition. This leads to erroneous results. |
| Comments |
| Comment by Dan Solodko [ 2020-06-11 ] |
|
if it's possible to use an error ER_INVALID_NTILE_ARGUMENT for unstable argument I'm ready to create a Pull Reqest |
| Comment by Anel Husakovic [ 2020-07-28 ] |
|
Pushed to 10.2 with 459b87f6b4ae96. |