Full DECIMAL support in ColumnStore (MCOL-641)

[MCOL-4452] UDAF processing might return wrong results duplicating one of the previous group's results Created: 2020-12-15  Updated: 2021-02-02  Resolved: 2020-12-23

Status: Closed
Project: MariaDB ColumnStore
Component/s: ExeMgr, PrimProc
Affects Version/s: 6.1.1
Fix Version/s: 6.1.1

Type: Sub-Task Priority: Major
Reporter: Roman Assignee: Roman
Resolution: Fixed Votes: 0
Labels: None

Sprint: 2020-1, 2020-2, 2020-3, 2020-4, 2020-5, 2020-6, 2020-7, 2021-1, 2021-2, 2021-3, 2021-4, 2021-5, 2021-6, 2021-7, 2021-8, 2021-9

 Description   

Consider the example:

MariaDB [test]> select CCHAR9, regr_avgx(CDECIMAL9_2, length(CCHAR9))  from datatypetestm1 where CCHAR9 in ('zzzzzzzzz','iiii') group by CCHAR9;
+-----------+----------------------------------------+
| CCHAR9    | regr_avgx(CDECIMAL9_2, length(CCHAR9)) |
+-----------+----------------------------------------+
| iiii      |                               9.000000 |
| zzzzzzzzz |                               9.000000 |
+-----------+----------------------------------------+
2 rows in set (0.021 sec)
 

The expected output must be this:

MariaDB [test]> select CCHAR9, regr_avgx(CDECIMAL9_2, length(CCHAR9))  from datatypetestm1 where CCHAR9 in ('zzzzzzzzz','iiii') group by CCHAR9;
+-----------+----------------------------------------+
| CCHAR9    | regr_avgx(CDECIMAL9_2, length(CCHAR9)) |
+-----------+----------------------------------------+
| iiii      |                               4.000000 |
| zzzzzzzzz |                               9.000000 |
+-----------+----------------------------------------+
2 rows in set (0.021 sec)



 Comments   
Comment by Roman [ 2020-12-22 ]

The problem is caused by the fact that RowAggregationUMP2::doUDAF() uses fRGContext and not udafContextsColl[funcColsIdx].

Generated at Thu Feb 08 02:50:27 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.