[MCOL-5542] Query causes TupleUnion::readInput() MCS-2035: An internal error occurred. Created: 2023-07-26  Updated: 2023-08-23  Resolved: 2023-08-23

Status: Closed
Project: MariaDB ColumnStore
Component/s: N/A
Affects Version/s: 22.08.7
Fix Version/s: 23.02.4

Type: Bug Priority: Major
Reporter: Edward Stoever Assignee: Unassigned
Resolution: Done Votes: 0
Labels: triage

Attachments: PNG File MCOL-5542_CS0617891_workaround.png    

 Description   

tested on CS 6.3.1 WITHOUT ERROR
tested on 22.08.8 where I see the error.
Customer reported this occurs in Columnstore version 22.08.7

create schema CS0617891; 
use CS0617891;
 
drop table if exists `test1`;
CREATE TABLE `test1` (`col1` decimal(12,2) DEFAULT NULL, `col2` smallint(5) unsigned DEFAULT NULL)
ENGINE=Columnstore DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
insert into test1 (col1,col2) values (99.99,2);
 
drop table if exists `test2`;
CREATE TABLE `test2` (`col1` decimal(12,2) DEFAULT NULL, `col2` int(10) unsigned DEFAULT NULL) 
ENGINE=Columnstore DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
insert into test2 (col1,col2) values (99.99,2);
 
--- RUN THIS UNION QUERY:
SELECT 'test1' AS table_name, count(*) as 'rows', SUM(col1*col2) AS losses FROM test1 UNION 
SELECT 'test2' AS table_name, count(*) as 'rows', SUM(col1*col2) AS losses FROM test2;
 
--- NOW, TRY THIS QUERY:
select * FROM (
SELECT 'test1' AS table_name, count(*) as 'rows', SUM(col1*col2) AS losses FROM test1 UNION 
SELECT 'test2' AS table_name, count(*) as 'rows', SUM(col1*col2) AS losses FROM test2) 
AS TABLES ORDER BY losses DESC, 'rows' DESC;
ERROR 1815 (HY000): Internal error: An unexpected condition within the query caused an internal processing error within Columnstore. Please check the log files for more details. Additional Information: error in UnionStep.

In err.log:

Jul 26 20:27:43 logs Calpont[216316]: 43.949355 |0|0|0| E 00 CAL0000: ./storage/columnstore/columnstore/utils/rowgroup/rowgroup.h@847: assertion '0' failed         %%10%%
Jul 26 20:27:43 logs joblist[216316]: 43.949490 |77|0|0| C 05 CAL0000: TupleUnion::readInput() MCS-2035: An internal error occurred.  Check the error log file & contact support.         %%10%%



 Comments   
Comment by Edward Stoever [ 2023-07-26 ]

I have attached a workaround as an image file.

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

edward please explain .. do u have a reproduction AND the workaround ?

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