From d00449d92173eaff0c28bcd8d28c68ee1e155323 Mon Sep 17 00:00:00 2001 From: dl239 Date: Tue, 31 Oct 2023 18:48:16 +0800 Subject: [PATCH] fix: desc (#3567) --- src/cmd/display.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/cmd/display.h b/src/cmd/display.h index 6f01549bada..518d68463de 100644 --- a/src/cmd/display.h +++ b/src/cmd/display.h @@ -106,13 +106,14 @@ __attribute__((unused)) static void PrintColumnKey( t.add("ttl"); t.add("ttl_type"); t.end_of_row(); - + int index_pos = 1; for (int i = 0; i < column_key_field.size(); i++) { const auto& column_key = column_key_field.Get(i); if (column_key.flag() == 1) { continue; } - t.add(std::to_string(i + 1)); + t.add(std::to_string(index_pos)); + index_pos++; t.add(column_key.index_name()); std::string key; for (const auto& name : column_key.col_name()) {