mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-22 01:30:51 +00:00
dbms: additions to prev. revision [#METR-12857].
This commit is contained in:
parent
5cc3316485
commit
a81b5d7df9
@ -40,6 +40,9 @@ public:
|
||||
if (Protocol::Server::Data == packet.type)
|
||||
{
|
||||
sample_block = packet.block;
|
||||
|
||||
if (!sample_block)
|
||||
throw Exception("Logical error: empty block received as table structure", ErrorCodes::LOGICAL_ERROR);
|
||||
}
|
||||
else if (Protocol::Server::Exception == packet.type)
|
||||
{
|
||||
@ -54,6 +57,9 @@ public:
|
||||
|
||||
void write(const Block & block) override
|
||||
{
|
||||
if (!sample_block)
|
||||
throw Exception("You must call IBlockOutputStream::writePrefix before IBlockOutputStream::write", ErrorCodes::LOGICAL_ERROR);
|
||||
|
||||
if (!blocksHaveEqualStructure(block, sample_block))
|
||||
{
|
||||
std::stringstream message;
|
||||
|
Loading…
Reference in New Issue
Block a user