[MCOL-4730] HAVING comparing ABS() result returns incorrect values Created: 2021-05-19  Updated: 2023-07-25  Resolved: 2023-03-15

Status: Closed
Project: MariaDB ColumnStore
Component/s: PrimProc
Affects Version/s: 6.1.1
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Roman Assignee: Unassigned
Resolution: Fixed Votes: 2
Labels: beginner-friendly


 Description   

The legacy regression test working_tpch1_compareLogOnly/having/having2.sql has a failure running the query:

MariaDB [tpch1]> select cinteger, abs(avg(cinteger)) from DataTypeTestm group by cinteger having abs(avg(cinteger)) > 7483645;
+----------+--------------------+
| cinteger | abs(avg(cinteger)) |
+----------+--------------------+
|  7483646 |       7483646.0000 |
|  7483647 |       7483647.0000 |
+----------+--------------------+
2 rows in set (0.011 sec)

The correct result is however:

MariaDB [tpch1]> select cinteger, abs(avg(cinteger)) from test42 group by cinteger having abs(avg(cinteger)) > 7483645;
+----------+--------------------+
| cinteger | abs(avg(cinteger)) |
+----------+--------------------+
| -7483646 |       7483646.0000 |
|  7483646 |       7483646.0000 |
|  7483647 |       7483647.0000 |
+----------+--------------------+
3 rows in set (0.001 sec)

As you can see the 3d record with a negative cinteger value isn't returned.



 Comments   
Comment by HongdongHe [ 2022-04-08 ]

I want to fix it

Comment by alexey vorovich (Inactive) [ 2023-07-25 ]

this was never merged

Comment by alexey vorovich (Inactive) [ 2023-07-25 ]

leonid.fedorov was this ever merged ?

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