Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
N/A
-
10.2.6-2, 10.2.6-3
Description
Ntile must only work for deterministic cases.
If we have a query such as
select ntile( n ) over (partition by c1 order by c2):
|
n must provide a stable value for every individual partition, or we should return an error.
Currently we compute
ntile(<current_value_of_n>)
|
, given the current row number in the partition. This leads to erroneous results.
Attachments
Issue Links
- is part of
-
MDEV-6115 window functions as in the SQL standard
-
- Closed
-
Activity
Field | Original Value | New Value |
---|---|---|
Description |
Ntile must only work for deterministic cases.
If we have a query such as select ntile(n) over (partition by c1 order by c2): n must provide a stable value for every individual partition, or we should return an error. Currently we compute ntile(<current_value_of_n>), given the current row number in the partition. This leads to erroneous results. |
Ntile must only work for deterministic cases.
If we have a query such as select ntile( n ) over (partition by c1 order by c2): n must provide a stable value for every individual partition, or we should return an error. Currently we compute ntile(<current_value_of_n>), given the current row number in the partition. This leads to erroneous results. |
Description |
Ntile must only work for deterministic cases.
If we have a query such as select ntile( n ) over (partition by c1 order by c2): n must provide a stable value for every individual partition, or we should return an error. Currently we compute ntile(<current_value_of_n>), given the current row number in the partition. This leads to erroneous results. |
Ntile must only work for deterministic cases.
If we have a query such as {noformat} select ntile( n ) over (partition by c1 order by c2): {noformat} n must provide a stable value for every individual partition, or we should return an error. Currently we compute {noformat} ntile(<current_value_of_n>) {noformat}, given the current row number in the partition. This leads to erroneous results. |
Component/s | Optimizer - Window functions [ 13502 ] | |
Component/s | OTHER [ 10125 ] |
Affects Version/s | N/A [ 14700 ] |
Labels | 10.2-ga |
Sprint | 10.2.6-2 [ 148 ] |
Rank | Ranked lower |
Sprint | 10.2.6-2 [ 148 ] | 10.2.6-2, 10.2.6-3 [ 148, 150 ] |
Labels | 10.2-ga |
Labels | beginner-friendly |
Assignee | Vicențiu Ciorbaru [ cvicentiu ] | Anel Husakovic [ anel ] |
Status | Open [ 1 ] | Confirmed [ 10101 ] |
Status | Confirmed [ 10101 ] | In Review [ 10002 ] |
Component/s | Server [ 13907 ] | |
Fix Version/s | 10.2.33 [ 24307 ] | |
Fix Version/s | 10.2 [ 14601 ] | |
Resolution | Fixed [ 1 ] | |
Status | In Review [ 10002 ] | Closed [ 6 ] |
Workflow | MariaDB v3 [ 74823 ] | MariaDB v4 [ 150322 ] |
if it's possible to use an error ER_INVALID_NTILE_ARGUMENT for unstable argument I'm ready to create a Pull Reqest