From 17c21c6ea3336b5737c5c5948d2b3a7e96ddfbbd Mon Sep 17 00:00:00 2001
From: Simon Liu <331435+monadbobo@users.noreply.github.com>
Date: Mon, 16 Sep 2019 10:03:57 +0800
Subject: [PATCH] Issue #933 Fix the problem of displaying the _dst attribute
 of the edge. (#938)

this problem was caused by the conversion of decimal to hexadecimal when the console prints the VID type.
---
 src/console/CmdProcessor.cpp | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/src/console/CmdProcessor.cpp b/src/console/CmdProcessor.cpp
index ab0d21e9..e099c75f 100644
--- a/src/console/CmdProcessor.cpp
+++ b/src/console/CmdProcessor.cpp
@@ -81,14 +81,10 @@ void CmdProcessor::calColumnWidths(
                     break;
                 }
                 case cpp2::ColumnValue::Type::id: {
-                    // Enough to hold "0x{16 letters}"
-                    if (widths[idx] < 18UL) {
-                        widths[idx] = 18UL;
-                        genFmt = true;
-                    }
+                    GET_VALUE_WIDTH(int64_t, id, "%ld");
+
                     if (genFmt) {
-                        formats[idx] =
-                            folly::stringPrintf(" %%-%ldLX |", widths[idx]);
+                        formats[idx] = folly::stringPrintf(" %%-%ldld |", widths[idx]);
                     }
                     break;
                 }
@@ -436,4 +432,3 @@ const std::string& CmdProcessor::getSpaceName() const {
 
 }  // namespace graph
 }  // namespace nebula
-
-- 
GitLab