[MCOL-4655] CAST(ROUND(magicInWideDecimal) AS SIGNED) returns NULL Created: 2021-04-01  Updated: 2023-07-02

Status: Open
Project: MariaDB ColumnStore
Component/s: PrimProc
Affects Version/s: 6.1.1
Fix Version/s: Icebox

Type: Bug Priority: Major
Reporter: Alexander Barkov Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
Relates
relates to MCOL-641 Full DECIMAL support in ColumnStore Closed
relates to MCOL-4361 Replace pow(10.0, (double)scale) expr... Closed

 Description   

DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (a DECIMAL(30,1)) ENGINE=ColumnStore;
INSERT INTO t1 VALUES (-9223372036854775807.9);
SELECT a, ROUND(a), CAST(ROUND(a) AS SIGNED) FROM t1;

+------------------------+----------------------+--------------------------+
| a                      | ROUND(a)             | CAST(ROUND(a) AS SIGNED) |
+------------------------+----------------------+--------------------------+
| -9223372036854775807.9 | -9223372036854775808 |                     NULL |
+------------------------+----------------------+--------------------------+

NULL in the last column looks wrong.


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