Details
-
Type:
Bug
-
Status: Closed (View Workflow)
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: N/A
-
Fix Version/s: 10.2.33
-
Component/s: Optimizer - Window functions, Server
-
Labels:
-
Sprint: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
-