Skip to content

Commit 6a74560

Browse files
committed
fix
1 parent 1c7cd0c commit 6a74560

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

clickhouse/client.cpp

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -554,18 +554,20 @@ bool Client::Impl::ReadBlock(InputStream& input, Block* block) {
554554
return false;
555555
}
556556

557+
uint8_t has_custom_serialization = 0;
558+
if (REVISION >= DBMS_MIN_REVISION_WITH_CUSTOM_SERIALIZATION) {
559+
if (!WireFormat::ReadFixed(input, &has_custom_serialization)) {
560+
return false;
561+
}
562+
}
563+
557564
if (ColumnRef col = CreateColumnByType(type, create_column_settings)) {
558565

559-
if (REVISION >= DBMS_MIN_REVISION_WITH_CUSTOM_SERIALIZATION) {
560-
uint8_t has_custom_serialization = 0;
561-
if (!WireFormat::ReadFixed(input, &has_custom_serialization)) {
562-
return false;
563-
}
564-
if (has_custom_serialization) {
565-
col->LoadSerializationKind(&input);
566-
}
566+
if (has_custom_serialization) {
567+
col->LoadSerializationKind(&input);
567568
}
568569

570+
569571
if (num_rows && !col->Load(&input, num_rows)) {
570572
throw ProtocolError("can't load column '" + name + "' of type " + type);
571573
}

0 commit comments

Comments
 (0)