mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-26 09:32:01 +00:00
AvroConfluent: skip broken messages
This commit is contained in:
parent
e472c83601
commit
2883831564
@ -739,6 +739,12 @@ bool AvroConfluentRowInputFormat::readRow(MutableColumns & columns, RowReadExten
|
||||
return true;
|
||||
}
|
||||
|
||||
void AvroConfluentRowInputFormat::syncAfterError()
|
||||
{
|
||||
// skip until the end of current kafka message
|
||||
in.tryIgnore(in.available());
|
||||
}
|
||||
|
||||
const AvroDeserializer & AvroConfluentRowInputFormat::getOrCreateDeserializer(SchemaId schema_id)
|
||||
{
|
||||
auto it = deserializer_cache.find(schema_id);
|
||||
|
@ -129,6 +129,9 @@ public:
|
||||
String getName() const override { return "AvroConfluentRowInputFormat"; }
|
||||
|
||||
class SchemaRegistry;
|
||||
protected:
|
||||
bool allowSyncAfterError() const override { return true; }
|
||||
void syncAfterError() override;
|
||||
private:
|
||||
std::shared_ptr<SchemaRegistry> schema_registry;
|
||||
using SchemaId = uint32_t;
|
||||
|
Loading…
Reference in New Issue
Block a user