Fix trash in schema inference

This commit is contained in:
Alexey Milovidov 2022-09-17 22:53:41 +02:00
parent 49a9c9e5fa
commit 47167494d9

View File

@ -63,9 +63,10 @@ ColumnsDescription readSchemaFromFormat(
{
names_and_types = external_schema_reader->readSchema();
}
catch (const DB::Exception & e)
catch (Exception & e)
{
throw Exception(ErrorCodes::CANNOT_EXTRACT_TABLE_STRUCTURE, "Cannot extract table structure from {} format file. Error: {}. You can specify the structure manually", format_name, e.message());
e.addMessage("Cannot extract table structure from {} format file. You can specify the structure manually", format_name);
throw;
}
}
else if (FormatFactory::instance().checkIfFormatHasSchemaReader(format_name))