[MDEV-12336] value forced to null with multiplication of window function expression Created: 2017-03-22 Updated: 2017-06-28 Resolved: 2017-03-30 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Optimizer - Window functions |
| Affects Version/s: | 10.2.4 |
| Fix Version/s: | 10.2.5 |
| Type: | Bug | Priority: | Major |
| Reporter: | David Thompson (Inactive) | Assignee: | Igor Babaev |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Test table / data:
Query that fails, note values for pct_of_total are null:
removing the 100 * from the pct_of_total expression results in correct values, however as a fraction rather than the desired percentage values:
The original query works on columnStore 1.0.7 (which has our own window function implementation on top of 10.1) correctly and is a pattern for calculating percentage of totals. |
| Comments |
| Comment by David Thompson (Inactive) [ 2017-03-22 ] | |||||||
|
Another workaround is to remove the brackets after the 100 *:
| |||||||
| Comment by Vicențiu Ciorbaru [ 2017-03-29 ] | |||||||
|
OK to push | |||||||
| Comment by Igor Babaev [ 2017-03-30 ] | |||||||
|
The fix for this bug was pushed into the 10.2 tree. |