fix crach on JOIN with array or tuple

This commit is contained in:
chertus 2019-03-01 18:32:32 +03:00
parent 5b850bad47
commit 83503df56a
3 changed files with 10 additions and 1 deletions

View File

@ -300,7 +300,7 @@ void Join::setSampleBlock(const Block & block)
if (column.get() != column_no_lc.get()) if (column.get() != column_no_lc.get())
{ {
materialized_columns.emplace_back(std::move(column_no_lc)); materialized_columns.emplace_back(std::move(column_no_lc));
key_columns[i] = materialized_columns[i].get(); key_columns[i] = materialized_columns.back().get();
} }
/// We will join only keys, where all components are not NULL. /// We will join only keys, where all components are not NULL.

View File

@ -0,0 +1,2 @@
0 (0,0)
0 (0,0)

View File

@ -0,0 +1,7 @@
SELECT * FROM (SELECT dummy as a, (toUInt8(0), toUInt8(0)) AS tup FROM system.one)
JOIN (SELECT dummy as a, (toUInt8(0), toUInt8(0)) AS tup FROM system.one)
USING (a, tup);
SELECT * FROM (SELECT dummy as a, (toUInt8(0), toUInt8(0)) AS tup FROM system.one)
GLOBAL ANY FULL OUTER JOIN (SELECT dummy as a, (toUInt8(0), toUInt8(0)) AS tup FROM system.one)
USING (a, tup);