Details
- 
    Bug 
- 
    Status: Closed (View Workflow)
- 
    Blocker 
- 
    Resolution: Fixed
- 
    6.1.1
- 
    None
Description
A client is having issues with wrapped selects and UNION ALL. I'll attach their original DDL and query, but I have a simplified reproduction case here.
| # DDL & Data | 
| create table t2 ( a int, c varchar(50)) engine=columnstore; | 
| insert into t2 values (1, 'CT_PropDelay'); | 
| Â | 
| # Query | 
| SELECT * FROM ( select a, c from t2 where c in ('x') group by a, c ) t | 
| UNION ALL | 
| SELECT * FROM ( select a, c from t2 where c in ('CT_PropDelay') group by a, c ) t | 
- What happens today is an error is thrown:
ERROR 1815 (HY000): Internal error: IDB-2021: 'c' is not in GROUP BY clause. All non-aggregate columns in the SELECT and ORDER BY clause must be included in the GROUP BY clause. 
- The expected outcome is for the query to run - with sample data it would look the same as
+------+--------------+| a | c |+------+--------------+| 1 | CT_PropDelay | +------+--------------+1 rows in set (0.080 sec) 
Attachments
Issue Links
- relates to
- 
                    MCOL-4942 Different results compared to innodb with union all and subselect with null in select and impossible where condition -         
- Closed
 
-         
- mentioned in
- 
                    Page Loading... 
- 
                    Page Loading... 
- 
                    Page Loading... 
- 
                    Page Loading... 
- 
                    Page Loading... 
- 
                    Page Loading... 
- 
                    Page Loading... 
- 
                    Page Loading... 
- 
                    Page Loading...