Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix edge all predicate embedding when generating path #5631

Merged
merged 2 commits into from
Jul 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion src/graph/planner/plan/Query.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
#ifndef GRAPH_PLANNER_PLAN_QUERY_H_
#define GRAPH_PLANNER_PLAN_QUERY_H_

#include <glog/logging.h>

#include "common/expression/AggregateExpression.h"
#include "graph/context/QueryContext.h"
#include "graph/planner/plan/PlanNode.h"
Expand Down Expand Up @@ -1713,7 +1715,15 @@ class Traverse final : public GetNeighbors {

const std::string& edgeAlias() const {
DCHECK(!this->colNames().empty());
return this->colNames().back();
const auto& colNames = this->colNames();
auto n = colNames.size();

if (!genPath_) {
return colNames[n - 1];
}
// When a path needs to be generated, Traverse outputs one more column
DCHECK_GT(n, 2);
return colNames[n - 2];
}

void setStepRange(const MatchStepRange& range) {
Expand Down
1 change: 0 additions & 1 deletion src/graph/util/FTIndexUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,5 @@ StatusOr<::nebula::plugin::ESAdapter> FTIndexUtils::getESAdapter(meta::MetaClien
return ::nebula::plugin::ESAdapter(std::move(clients));
}


} // namespace graph
} // namespace nebula
Loading