Fix spacing issue and update reference file

This commit is contained in:
Blargian 2024-06-13 14:13:39 +02:00
parent 2c07a8a111
commit d364f447a7
2 changed files with 7 additions and 8 deletions

View File

@ -36,7 +36,7 @@ void PrettySpaceBlockOutputFormat::writeChunk(const Chunk & chunk, PortKind port
if (format_settings.pretty.output_format_pretty_row_numbers)
writeString(String(row_number_width, ' '), out);
/// Names
auto write_names = [&]() -> void
auto write_names = [&](const bool is_footer) -> void
{
for (size_t i = 0; i < num_columns; ++i)
{
@ -70,9 +70,12 @@ void PrettySpaceBlockOutputFormat::writeChunk(const Chunk & chunk, PortKind port
writeChar(' ', out);
}
}
if (!is_footer)
writeCString("\n\n", out);
else
writeCString("\n", out);
};
write_names();
write_names(false);
for (size_t row = 0; row < num_rows && total_rows + row < max_rows; ++row)
{
@ -111,7 +114,7 @@ void PrettySpaceBlockOutputFormat::writeChunk(const Chunk & chunk, PortKind port
writeString(String(row_number_width, ' '), out);
/// Write footer
if ((num_rows >= format_settings.pretty.output_format_pretty_display_footer_column_names_min_rows) && format_settings.pretty.output_format_pretty_display_footer_column_names)
write_names();
write_names(true);
total_rows += num_rows;
}

View File

@ -2068,7 +2068,6 @@
100. 99 UInt64 1
number toTypeName(number) mod(number, 2)
number toTypeName(number) mod(number, 2)
1. 0 UInt64 0
@ -2173,7 +2172,6 @@
100. 99 UInt64 1
number toTypeName(number) mod(number, 2)
number toTypeName(number) mod(number, 2)
1. 0 UInt64 0
@ -2278,7 +2276,6 @@
100. 99 UInt64 1
number toTypeName(number) mod(number, 2)
number toTypeName(number) mod(number, 2)
1. 0 UInt64 0
@ -2383,4 +2380,3 @@
100. 99 UInt64 1
number toTypeName(number) mod(number, 2)