From aec4c3dd2b1511e6d288db02017c0c871efdfd6e Mon Sep 17 00:00:00 2001 From: gvolfing <107616712+gvolfing@users.noreply.github.com> Date: Mon, 23 Oct 2023 13:07:46 +0200 Subject: [PATCH] Fix bug in alias mappings (#1252) --- config/mappings.json | 5 ++--- src/query/procedure/module.cpp | 6 ++++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/config/mappings.json b/config/mappings.json index 44d497cd1..b4c14c77a 100644 --- a/config/mappings.json +++ b/config/mappings.json @@ -1,8 +1,8 @@ { "dbms.components": "mgps.components", "apoc.util.validate": "mgps.validate", - "db.schema.nodeTypeProperties":"schema.node_type_properties", - "db.schema.relTypeProperties":"schema.rel_type_properties", + "db.schema.nodeTypeProperties": "schema.NodeTypeOroperties", + "db.schema.relTypeProperties": "schema.RelTypeProperties", "apoc.coll.contains": "collections.contains", "apoc.coll.partition": "collections.partition", "apoc.coll.toSet": "collections.to_set", @@ -23,5 +23,4 @@ "apoc.refactor.cloneSubgraph": "refactor.clone_subgraph", "apoc.refactor.cloneSubgraphFromPath": "refactor.clone_subgraph_from_path", "apoc.label.exists": "label.exists" - } diff --git a/src/query/procedure/module.cpp b/src/query/procedure/module.cpp index 338ccbcaa..58706631c 100644 --- a/src/query/procedure/module.cpp +++ b/src/query/procedure/module.cpp @@ -1331,15 +1331,17 @@ std::optional<std::pair<ModulePtr, const T *>> MakePairIfPropFound(const ModuleR if (!result) { return std::nullopt; } - auto [module_name, prop_name] = *result; + auto [module_name, module_prop_name] = *result; auto module = module_registry.GetModuleNamed(module_name); + auto prop_name = std::string(module_prop_name); if (!module) { // Check for possible callable aliases. const auto maybe_valid_alias = gCallableAliasMapper.FindAlias(std::string(fully_qualified_name)); if (maybe_valid_alias) { result = FindModuleNameAndProp(module_registry, *maybe_valid_alias, memory); - auto [module_name, prop_name] = *result; + auto [module_name, module_prop_name] = *result; module = module_registry.GetModuleNamed(module_name); + prop_name = std::string(module_prop_name); if (!module) { return std::nullopt; }