mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 08:32:02 +00:00
Fix usage of columns from header in SummingSortedBlockInputStream. #2273
This commit is contained in:
parent
d57c118fdf
commit
6ba8cb922c
@ -263,7 +263,7 @@ Block SummingSortedBlockInputStream::readImpl()
|
||||
size_t tuple_size = desc.column_numbers.size();
|
||||
MutableColumns tuple_columns(tuple_size);
|
||||
for (size_t i = 0; i < tuple_size; ++i)
|
||||
tuple_columns[i] = header.safeGetByPosition(desc.column_numbers[i]).column->assumeMutable();
|
||||
tuple_columns[i] = header.safeGetByPosition(desc.column_numbers[i]).column->cloneEmpty();
|
||||
|
||||
desc.merged_column = ColumnTuple::create(std::move(tuple_columns));
|
||||
}
|
||||
|
@ -0,0 +1,29 @@
|
||||
DROP TABLE IF EXISTS test.tab ;
|
||||
|
||||
CREATE TABLE test.tab
|
||||
(
|
||||
date Date,
|
||||
key UInt32,
|
||||
testMap Nested(
|
||||
k UInt16,
|
||||
v UInt64)
|
||||
)
|
||||
ENGINE = SummingMergeTree(date, (date, key), 1);
|
||||
|
||||
INSERT INTO test.tab SELECT
|
||||
today(),
|
||||
number,
|
||||
[toUInt16(number)],
|
||||
[number]
|
||||
FROM system.numbers
|
||||
LIMIT 8190;
|
||||
|
||||
INSERT INTO test.tab SELECT
|
||||
today(),
|
||||
number + 8190,
|
||||
[toUInt16(number)],
|
||||
[number + 8190]
|
||||
FROM system.numbers
|
||||
LIMIT 10;
|
||||
|
||||
OPTIMIZE TABLE test.tab;
|
Loading…
Reference in New Issue
Block a user