From 2ff81ebf047eba12ff4a3d254e1c0e2ddcee7e6b Mon Sep 17 00:00:00 2001 From: Kostas Kyrimis Date: Wed, 23 Nov 2022 15:16:14 +0200 Subject: [PATCH] Address missed GH comments && fix broken merge --- src/functions/awesome_memgraph_functions.hpp | 8 +------- src/storage/v3/edge_accessor.cpp | 2 +- src/storage/v3/vertex_accessor.cpp | 3 --- src/storage/v3/vertex_accessor.hpp | 3 --- tests/unit/query_v2_expression_evaluator.cpp | 2 +- 5 files changed, 3 insertions(+), 15 deletions(-) diff --git a/src/functions/awesome_memgraph_functions.hpp b/src/functions/awesome_memgraph_functions.hpp index 33cc954f5..475380217 100644 --- a/src/functions/awesome_memgraph_functions.hpp +++ b/src/functions/awesome_memgraph_functions.hpp @@ -45,19 +45,13 @@ struct FunctionContext { struct StorageEngineTag {}; struct QueryEngineTag {}; -namespace impl { -struct SinkCallable { - void operator()() {} -}; -} // namespace impl - /// Return the function implementation with the given name. /// /// Note, returned function signature uses C-style access to an array to allow /// having an array stored anywhere the caller likes, as long as it is /// contiguous in memory. Since most functions don't take many arguments, it's /// convenient to have them stored in the calling stack frame. -template +template std::function NameToFunction(const std::string &function_name); diff --git a/src/storage/v3/edge_accessor.cpp b/src/storage/v3/edge_accessor.cpp index d60cdeebc..312a9c2d7 100644 --- a/src/storage/v3/edge_accessor.cpp +++ b/src/storage/v3/edge_accessor.cpp @@ -180,6 +180,6 @@ Result> EdgeAccessor::Properties(View view) } // NOLINTNEXTLINE(readability-convert-member-functions-to-static) -size_t EdgeAccessor::CypherId() const { return 10; } +size_t EdgeAccessor::CypherId() const { return Gid().AsUint(); } } // namespace memgraph::storage::v3 diff --git a/src/storage/v3/vertex_accessor.cpp b/src/storage/v3/vertex_accessor.cpp index 10c39dba6..543caa88a 100644 --- a/src/storage/v3/vertex_accessor.cpp +++ b/src/storage/v3/vertex_accessor.cpp @@ -733,7 +733,4 @@ Result VertexAccessor::OutDegree(View view) const { return degree; } -// NOLINTNEXTLINE(readability-convert-member-functions-to-static) -size_t VertexAccessor::CypherId() const { return 10; } - } // namespace memgraph::storage::v3 diff --git a/src/storage/v3/vertex_accessor.hpp b/src/storage/v3/vertex_accessor.hpp index d708f723e..682a04e39 100644 --- a/src/storage/v3/vertex_accessor.hpp +++ b/src/storage/v3/vertex_accessor.hpp @@ -118,9 +118,6 @@ class VertexAccessor final { } bool operator!=(const VertexAccessor &other) const noexcept { return !(*this == other); } - // Dummy function - size_t CypherId() const; - private: /// Add a label and return `true` if insertion took place. /// `false` is returned if the label already existed. diff --git a/tests/unit/query_v2_expression_evaluator.cpp b/tests/unit/query_v2_expression_evaluator.cpp index 1c0130571..396d03eb6 100644 --- a/tests/unit/query_v2_expression_evaluator.cpp +++ b/tests/unit/query_v2_expression_evaluator.cpp @@ -32,7 +32,7 @@ #include "query/v2/shard_request_manager.hpp" #include "query_v2_query_common.hpp" #include "storage/v3/property_value.hpp" -#include "storage/v3/storage.hpp" +#include "storage/v3/shard.hpp" #include "utils/exceptions.hpp" #include "utils/string.hpp"