CREATE DATABASE IF NOT EXISTS temp
CREATE TABLE temp.test (
`id` Nullable(String),
`status` Nullable(Enum8('NEW' = 0, 'CANCEL' = 1)),
`nested.nestedType` Array(Nullable(String)),
`partition` Date
) ENGINE = MergeTree() PARTITION BY partition
ORDER BY
partition SETTINGS index_granularity = 8192
INSERT INTO temp.test VALUES ('1', 'NEW', array('a', 'b'), now())
I try to execute such query:
SELECT
status,
count() AS all
FROM temp.test ARRAY JOIN nested as nestedJoined
WHERE (status IN (
SELECT status
FROM temp.test ARRAY JOIN nested as nestedJoined
GROUP BY status
ORDER BY count() DESC
LIMIT 10)) AND (id IN ('1', '2'))
GROUP BY CUBE(status)
LIMIT 100
But it throws an exception:
Code: 9, e.displayText() = DB::Exception: Size of offsets doesn't match size of column. (version 19.17.6.36 (official build))
This only happens in subquery for Enum/Int columns with ARRAY JOIN in FROM clause.
INSERT INTO temp.test VALUES ('1', 'NEW', array('a', 'b'), now())I try to execute such query:
But it throws an exception:
Code: 9, e.displayText() = DB::Exception: Size of offsets doesn't match size of column. (version 19.17.6.36 (official build))
This only happens in subquery for Enum/Int columns with ARRAY JOIN in FROM clause.