From 8636788ab295a97a52ba8fcddebd528455e4fb46 Mon Sep 17 00:00:00 2001 From: jbajic Date: Wed, 9 Nov 2022 15:55:34 +0100 Subject: [PATCH] Fix typos --- src/storage/v3/shard_rsm.cpp | 30 ++++++++++++++---------------- tests/simulation/shard_rsm.cpp | 2 +- 2 files changed, 15 insertions(+), 17 deletions(-) diff --git a/src/storage/v3/shard_rsm.cpp b/src/storage/v3/shard_rsm.cpp index 9f5c33218..f59264725 100644 --- a/src/storage/v3/shard_rsm.cpp +++ b/src/storage/v3/shard_rsm.cpp @@ -57,11 +57,11 @@ using conversions::ToPropertyValue; namespace { namespace msgs = msgs; -using AllEdgePropertyDataSructure = std::map; -using SpecificEdgePropertyDataSructure = std::vector; +using AllEdgePropertyDataStructure = std::map; +using SpecificEdgePropertyDataStructure = std::vector; -using AllEdgeProperties = std::tuple; -using SpecificEdgeProperties = std::tuple; +using AllEdgeProperties = std::tuple; +using SpecificEdgeProperties = std::tuple; using SpecificEdgePropertiesVector = std::vector; using AllEdgePropertiesVector = std::vector; @@ -69,7 +69,7 @@ using AllEdgePropertiesVector = std::vector; using EdgeAccessors = std::vector; using EdgeFiller = std::function; -using EdgeUniqunessFunction = std::function; +using EdgeUniquenessFunction = std::function; struct VertexIdCmpr { bool operator()(const storage::v3::VertexId *lhs, const storage::v3::VertexId *rhs) const { return *lhs < *rhs; } @@ -180,8 +180,6 @@ std::vector EvaluateVertexExpressions(DbAccessor &dba, const VertexA return evaluated_expressions; } -struct LocalError {}; - std::optional> FillUpSourceVertexSecondaryLabels(const std::optional &v_acc, const msgs::ExpandOneRequest &req) { auto secondary_labels = v_acc->Labels(View::NEW); @@ -242,7 +240,7 @@ std::optional> FillUpSourceVertexProperties(const st std::optional, 2>> FillUpConnectingEdges( const std::optional &v_acc, const msgs::ExpandOneRequest &req, - const EdgeUniqunessFunction &maybe_filter_based_on_edge_uniquness) { + const EdgeUniquenessFunction &maybe_filter_based_on_edge_uniquness) { std::vector edge_types{}; edge_types.reserve(req.edge_types.size()); std::transform(req.edge_types.begin(), req.edge_types.end(), std::back_inserter(edge_types), @@ -296,11 +294,11 @@ std::optional, 2>> FillUpConnectingEdges( return std::array, 2>{in_edges, out_edges}; } -using AllEdgePropertyDataSructure = std::map; -using SpecificEdgePropertyDataSructure = std::vector; +using AllEdgePropertyDataStructure = std::map; +using SpecificEdgePropertyDataStructure = std::vector; -using AllEdgeProperties = std::tuple; -using SpecificEdgeProperties = std::tuple; +using AllEdgeProperties = std::tuple; +using SpecificEdgeProperties = std::tuple; using SpecificEdgePropertiesVector = std::vector; using AllEdgePropertiesVector = std::vector; @@ -354,7 +352,7 @@ void LogError(const ResultErrorType &error, const std::string_view action) { std::optional GetExpandOneResult( Shard::Accessor &acc, msgs::VertexId src_vertex, const msgs::ExpandOneRequest &req, - const EdgeUniqunessFunction &maybe_filter_based_on_edge_uniquness, const EdgeFiller &edge_filler, + const EdgeUniquenessFunction &maybe_filter_based_on_edge_uniquness, const EdgeFiller &edge_filler, const Schemas::Schema *schema) { /// Fill up source vertex const auto primary_key = ConvertPropertyVector(src_vertex.second); @@ -397,9 +395,9 @@ std::optional GetExpandOneResult( return result_row; } -EdgeUniqunessFunction InitializeEdgeUniqunessFunction(bool only_unique_neighbor_rows) { +EdgeUniquenessFunction InitializeEdgeUniquenessFunction(bool only_unique_neighbor_rows) { // Functions to select connecting edges based on uniquness - EdgeUniqunessFunction maybe_filter_based_on_edge_uniquness; + EdgeUniquenessFunction maybe_filter_based_on_edge_uniquness; if (only_unique_neighbor_rows) { maybe_filter_based_on_edge_uniquness = [](EdgeAccessors &&edges, @@ -871,7 +869,7 @@ msgs::ReadResponses ShardRsm::HandleRead(msgs::ExpandOneRequest &&req) { std::vector results; - auto maybe_filter_based_on_edge_uniquness = InitializeEdgeUniqunessFunction(req.only_unique_neighbor_rows); + auto maybe_filter_based_on_edge_uniquness = InitializeEdgeUniquenessFunction(req.only_unique_neighbor_rows); auto edge_filler = InitializeEdgeFillerFunction(req); for (auto &src_vertex : req.src_vertices) { diff --git a/tests/simulation/shard_rsm.cpp b/tests/simulation/shard_rsm.cpp index 500649f4c..5405abd8d 100644 --- a/tests/simulation/shard_rsm.cpp +++ b/tests/simulation/shard_rsm.cpp @@ -906,7 +906,7 @@ void TestCreateAndUpdateVertices(ShardClient &client) { auto unique_prop_val = GetUniqueInteger(); MG_ASSERT(AttemptToCreateVertex(client, unique_prop_val)); - MG_ASSERT(AttemptToUpdateVertex(client, unique_prop_val, {LabelId::FromInt(3)})); + MG_ASSERT(AttemptToUpdateVertex(client, unique_prop_val, {LabelId::FromInt(3)}, {})); MG_ASSERT(AttemptToUpdateVertex(client, unique_prop_val, {}, {LabelId::FromInt(3)})); MG_ASSERT(AttemptToRemoveVertexProperty(client, unique_prop_val)); }