This commit is contained in:
feng lv 2020-09-30 09:50:23 +08:00
parent 4f000388a7
commit c857b5dd5d

View File

@ -34,8 +34,8 @@ void PrettyBlockOutputFormat::calculateWidths(
{
size_t num_rows = std::min(chunk.getNumRows(), format_settings.pretty.max_rows);
auto max_row_number = std::to_string(num_rows);
row_number_width = max_row_number.size() + 2;
/// len(num_rows) + len(". ")
row_number_width = std::floor(std::log10(num_rows)) + 3;
size_t num_columns = chunk.getNumColumns();
const auto & columns = chunk.getColumns();