Fixed most cases of misleading messages "Could not print diagnostic info because two last rows aren't in buffer (rare case)" [#METR-20000].

This commit is contained in:
Alexey Milovidov 2016-12-30 08:40:49 +03:00
parent 3336a66161
commit 3f9fc77e22
2 changed files with 6 additions and 0 deletions

View File

@ -134,6 +134,9 @@ bool CSVRowInputStream::read(Block & block)
} }
catch (Exception & e) catch (Exception & e)
{ {
if (istr.eof()) /// Buffer has gone, cannot extract information about what has been parsed.
throw;
String verbose_diagnostic; String verbose_diagnostic;
{ {
WriteBufferFromString diagnostic_out(verbose_diagnostic); WriteBufferFromString diagnostic_out(verbose_diagnostic);

View File

@ -103,6 +103,9 @@ bool TabSeparatedRowInputStream::read(Block & block)
} }
catch (Exception & e) catch (Exception & e)
{ {
if (istr.eof()) /// Buffer has gone, cannot extract information about what has been parsed.
throw;
String verbose_diagnostic; String verbose_diagnostic;
{ {
WriteBufferFromString diagnostic_out(verbose_diagnostic); WriteBufferFromString diagnostic_out(verbose_diagnostic);