mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-26 09:32:01 +00:00
Fix
This commit is contained in:
parent
40a4742f93
commit
bc9b56096f
@ -271,8 +271,24 @@ void MaterializedPostgreSQLConsumer::readTupleData(
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
std::exception_ptr error;
|
||||||
for (int column_idx = 0; column_idx < num_columns; ++column_idx)
|
for (int column_idx = 0; column_idx < num_columns; ++column_idx)
|
||||||
proccess_column_value(readInt8(message, pos, size), column_idx);
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
proccess_column_value(readInt8(message, pos, size), column_idx);
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
insertDefaultValue(buffer, column_idx);
|
||||||
|
/// Let's collect only the first exception.
|
||||||
|
/// This delaying of error throw is needed because
|
||||||
|
/// some errors can be ignored and just logged,
|
||||||
|
/// but in this case we need to finish insertion to all columns.
|
||||||
|
if (!error)
|
||||||
|
error = std::current_exception();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
@ -303,6 +319,9 @@ void MaterializedPostgreSQLConsumer::readTupleData(
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (error)
|
||||||
|
std::rethrow_exception(error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user