Clickhouse: UNION ALL: mismatch size

Created on 3 Nov 2017  Β·  1Comment  Β·  Source: ClickHouse/ClickHouse

ClickHouse v 1.1.54284 is working fine

Example

CREATE TABLE union_bug (
    Event String,
    Datetime DateTime
) Engine = Memory;

INSERT INTO union_bug VALUES ('A', now()), ('B', now());

SELECT * FROM union_bug WHERE Event = 'A'
UNION ALL 
SELECT * FROM union_bug WHERE Event = 'B'

result

β”Œβ”€Event─┬────────────Datetime─┐
β”‚ A     β”‚ 2017-11-03 07:45:15 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”Œβ”€Event─┬────────────Datetime─┐
β”‚ B     β”‚ 2017-11-03 07:45:15 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

1.1.54304/1.1.54310

SELECT *
FROM union_bug 
WHERE Event = 'A'
UNION ALL 
SELECT *
FROM union_bug 
WHERE Event = 'B'

Received exception from server:
Code: 258. DB::Exception: Received from localhost:9000, 127.0.0.1. DB::Exception: Size mismatch in UNION ALL chain. 

It's work

SELECT Event, Datetime FROM union_bug WHERE Event = 'A'
UNION ALL 
SELECT * FROM union_bug WHERE Event = 'B'

It doesn't work

SELECT * FROM union_bug WHERE Event = 'A'
UNION ALL 
SELECT Event, Datetime FROM union_bug WHERE Event = 'B'
bug

Most helpful comment

Confirmed, thanks for a simple and reproducible test case!

>All comments

Confirmed, thanks for a simple and reproducible test case!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

innerr picture innerr  Β·  3Comments

fizerkhan picture fizerkhan  Β·  3Comments

jimmykuo picture jimmykuo  Β·  3Comments

goranc picture goranc  Β·  3Comments

vixa2012 picture vixa2012  Β·  3Comments