Update PrettySpaceBlockOutputStream.cpp

This commit is contained in:
alexey-milovidov 2019-06-09 17:22:16 +03:00 committed by GitHub
parent 2ee6601990
commit 7324e5e8d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,10 +3,10 @@
#include <Formats/FormatFactory.h>
#include <Formats/PrettySpaceBlockOutputStream.h>
namespace DB
{
void PrettySpaceBlockOutputStream::write(const Block & block)
{
UInt64 max_rows = format_settings.pretty.max_rows;
@ -57,12 +57,14 @@ void PrettySpaceBlockOutputStream::write(const Block & block)
}
}
writeCString("\n\n", ostr);
for (size_t i = 0; i < rows && total_rows + i < max_rows; ++i)
{
for (size_t j = 0; j < columns; ++j)
{
if (j != 0)
writeCString(" ", ostr);
writeValueWithPadding(block.getByPosition(j), i, widths[j].empty() ? max_widths[j] : widths[j][i], max_widths[j]);
}