Details
-
Bug
-
Status: Closed (View Workflow)
-
Blocker
-
Resolution: Fixed
-
6.1.1
-
2021-8
Description
The problem does not seem to be repeatable in 5.x.
DROP TABLE IF EXISTS t1; |
CREATE TABLE t1 (a DECIMAL(17,1), b BIGINT) ENGINE=ColumnStore; |
INSERT INTO t1 VALUES (1, 1); |
INSERT INTO t1 VALUES (9999999999999999, 99999999999999999); |
SELECT * FROM (SELECT a FROM t1 UNION SELECT b FROM t1) tu; |
+------+
|
| a |
|
+------+
|
| 0.0 |
|
| 0.0 |
|
| 0.0 |
|
+------+
|
SELECT * FROM (SELECT a FROM t1 UNION ALL SELECT b FROM t1) tu; |
+------+
|
| a |
|
+------+
|
| 0.0 |
|
| 0.0 |
|
| 0.0 |
|
| 0.0 |
|
+------+
|
Note, without the subquery it works as expected:
SELECT a FROM t1 UNION SELECT b FROM t1; |
+---------------------+
|
| a |
|
+---------------------+
|
| 1.0 |
|
| 9999999999999999.0 |
|
| 99999999999999999.0 |
|
+---------------------+
|
SELECT a FROM t1 UNION ALL SELECT b FROM t1; |
+---------------------+
|
| a |
|
+---------------------+
|
| 1.0 |
|
| 9999999999999999.0 |
|
| 1.0 |
|
| 99999999999999999.0 |
|
+---------------------+
|
Attachments
Issue Links
- blocks
-
MCOL-4613 Garbage result of a union between huge narrow DECIMAL and BIGINT
- Closed
1.
|
Additional test needed | Closed | Daniel Lee (Inactive) |