[MCOL-926] UDAF returns null for 2nd or more applications against same column Created: 2017-09-15 Updated: 2017-10-26 Resolved: 2017-10-26 |
|
| Status: | Closed |
| Project: | MariaDB ColumnStore |
| Component/s: | None |
| Affects Version/s: | 1.1.0 |
| Fix Version/s: | 1.1.1 |
| Type: | Bug | Priority: | Major |
| Reporter: | David Thompson (Inactive) | Assignee: | Daniel Lee (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Sprint: | 2017-19, 2017-20, 2017-21 |
| Description |
|
to reproduce:
doesn't matter the order or function but when you have multiple udafs applied to the same column the ones after the first ones return null |
| Comments |
| Comment by David Thompson (Inactive) [ 2017-09-15 ] | ||||||||
|
similar behavior in group by sql. | ||||||||
| Comment by Daniel Lee (Inactive) [ 2017-10-24 ] | ||||||||
|
Need description of the fix. Full fix? partial fix? | ||||||||
| Comment by David Thompson (Inactive) [ 2017-10-24 ] | ||||||||
|
This should be a full fix | ||||||||
| Comment by David Hall (Inactive) [ 2017-10-24 ] | ||||||||
|
There's special code for duplicate aggregate functions. It tries to optimize out any duplications. This code needed to be modified since most of the aggregate code sees UDAFs as all the same. It optimized out subsequent UDAF, even though they weren't actually the same function. | ||||||||
| Comment by David Hall (Inactive) [ 2017-10-26 ] | ||||||||
|
To add the UDAF functions: | ||||||||
| Comment by Daniel Lee (Inactive) [ 2017-10-26 ] | ||||||||
|
Build verified: Github source for 1.1.1 /root/columnstore/mariadb-columnstore-server Merge pull request #72 from mariadb-corporation/ /root/columnstore/mariadb-columnstore-server/mariadb-columnstore-engine Merge pull request #299 from mariadb-corporation/mcol-667 Mcol 667 MariaDB [mytest]> select median(i1), avg_mode(i1) from s1;
-----------
----------- MariaDB [mytest]> select avg_mode(i1), median(i1) from s1;
-------------
------------- |