From 28dcae6f9309ab3f64301c3777d00db64e177bd1 Mon Sep 17 00:00:00 2001 From: jimingquan Date: Mon, 3 Apr 2023 18:36:26 +0800 Subject: [PATCH] fix shortest path --- src/graph/validator/MatchValidator.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/graph/validator/MatchValidator.cpp b/src/graph/validator/MatchValidator.cpp index 2403bbad5fe..561322b6aaa 100644 --- a/src/graph/validator/MatchValidator.cpp +++ b/src/graph/validator/MatchValidator.cpp @@ -181,7 +181,11 @@ Status MatchValidator::buildPathExpr(const MatchPath *path, auto pathBuild = PathBuildExpression::make(pool); for (size_t i = 0; i < edgeInfos.size(); ++i) { pathBuild->add(InputPropertyExpression::make(pool, nodeInfos[i].alias)); - pathBuild->add(InputPropertyExpression::make(pool, edgeInfos[i].innerAlias)); + if (pathType == MatchPath::PathType::kDefault) { + pathBuild->add(InputPropertyExpression::make(pool, edgeInfos[i].innerAlias)); + } else { + pathBuild->add(InputPropertyExpression::make(pool, edgeInfos[i].alias)); + } } pathBuild->add(InputPropertyExpression::make(pool, nodeInfos.back().alias)); pathInfo.pathBuild = std::move(pathBuild);