Merge pull request #5560 from yandex/perftests-file-formats

Fix #5439 bug PrettySpace format
This commit is contained in:
alexey-milovidov 2019-06-09 17:22:47 +03:00 committed by GitHub
commit 4c7d71af1c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 7 deletions

View File

@ -7,7 +7,6 @@
namespace DB
{
void PrettySpaceBlockOutputStream::write(const Block & block)
{
UInt64 max_rows = format_settings.pretty.max_rows;
@ -26,12 +25,6 @@ void PrettySpaceBlockOutputStream::write(const Block & block)
Widths name_widths;
calculateWidths(block, widths, max_widths, name_widths, format_settings);
/// Do not align on too long values.
if (terminal_width > 80)
for (size_t i = 0; i < columns; ++i)
if (max_widths[i] > terminal_width / 2)
max_widths[i] = terminal_width / 2;
/// Names
for (size_t i = 0; i < columns; ++i)
{

View File

@ -40,6 +40,7 @@
<value>PrettyCompact</value>
<value>PrettyCompactMonoBlock</value>
<value>PrettyNoEscapes</value>
<value>PrettySpace</value>
<value>RowBinary</value>
<value>Native</value>
<value>XML</value>