mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-17 21:24:28 +00:00
Try fix header for TTLBlockInputStream.
This commit is contained in:
parent
feccf47f27
commit
9f7de6a1a4
@ -103,6 +103,15 @@ bool TTLBlockInputStream::isTTLExpired(time_t ttl) const
|
|||||||
return (ttl && (ttl <= current_time));
|
return (ttl && (ttl <= current_time));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Block reorderColumns(Block block, const Block & header)
|
||||||
|
{
|
||||||
|
Block res;
|
||||||
|
for (const auto & col : header)
|
||||||
|
res.insert(block.getByName(col.name));
|
||||||
|
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
Block TTLBlockInputStream::readImpl()
|
Block TTLBlockInputStream::readImpl()
|
||||||
{
|
{
|
||||||
/// Skip all data if table ttl is expired for part
|
/// Skip all data if table ttl is expired for part
|
||||||
@ -136,7 +145,7 @@ Block TTLBlockInputStream::readImpl()
|
|||||||
updateMovesTTL(block);
|
updateMovesTTL(block);
|
||||||
updateRecompressionTTL(block);
|
updateRecompressionTTL(block);
|
||||||
|
|
||||||
return block;
|
return reorderColumns(std::move(block), header);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TTLBlockInputStream::readSuffixImpl()
|
void TTLBlockInputStream::readSuffixImpl()
|
||||||
|
Loading…
Reference in New Issue
Block a user