From 39deba3b9e466359787c0b264757e896ac79d32e Mon Sep 17 00:00:00 2001
From: Matej Ferencevic <matej.ferencevic@memgraph.io>
Date: Wed, 1 Apr 2020 16:19:09 +0200
Subject: [PATCH] Fix wrong implicit cast in query dumper

Summary: All integers are signed in openCypher.

Reviewers: buda, llugovic

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D2746
---
 src/query/dump.cpp | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/query/dump.cpp b/src/query/dump.cpp
index d688dee36..7b4a52baa 100644
--- a/src/query/dump.cpp
+++ b/src/query/dump.cpp
@@ -78,7 +78,7 @@ void DumpPropertyValue(std::ostream *os, const storage::PropertyValue &value) {
 void DumpProperties(
     std::ostream *os, query::DbAccessor *dba,
     const std::map<storage::PropertyId, storage::PropertyValue> &store,
-    std::optional<uint64_t> property_id = std::nullopt) {
+    std::optional<int64_t> property_id = std::nullopt) {
   *os << "{";
   if (property_id) {
     *os << kInternalPropertyId << ": " << *property_id;
@@ -131,8 +131,7 @@ void DumpVertex(std::ostream *os, query::DbAccessor *dba,
             "Unexpected error when getting properties.");
     }
   }
-  DumpProperties(os, dba, *maybe_props,
-                 std::optional<uint64_t>(vertex.CypherId()));
+  DumpProperties(os, dba, *maybe_props, vertex.CypherId());
   *os << ");";
 }