From 32e9e6545d52677d1e38e7fe4721264ec18f8783 Mon Sep 17 00:00:00 2001 From: yixinglu <2520865+yixinglu@users.noreply.github.com> Date: Sat, 3 Dec 2022 10:17:57 +0800 Subject: [PATCH] Fix compile --- src/graph/executor/query/InnerJoinExecutor.cpp | 6 +++--- src/graph/executor/query/JoinExecutor.cpp | 2 +- src/graph/executor/query/LeftJoinExecutor.cpp | 2 +- src/graph/planner/match/ShortestPathPlanner.cpp | 2 +- src/graph/visitor/PrunePropertiesVisitor.cpp | 2 +- src/graph/visitor/PrunePropertiesVisitor.h | 2 +- .../features/optimizer/PrunePropertiesRule.feature | 14 +++++++------- 7 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/graph/executor/query/InnerJoinExecutor.cpp b/src/graph/executor/query/InnerJoinExecutor.cpp index d1eba210cb4..0919b939c23 100644 --- a/src/graph/executor/query/InnerJoinExecutor.cpp +++ b/src/graph/executor/query/InnerJoinExecutor.cpp @@ -246,7 +246,7 @@ void InnerJoinExecutor::buildNewRow(const std::unordered_mapkind() == PlanNode::Kind::kHashInnerJoin) { - return node_->asNode()->leftInputVar(); + return node_->asNode()->leftInputVar(); } else { return node_->asNode()->leftVar().first; } @@ -254,7 +254,7 @@ const std::string& InnerJoinExecutor::leftVar() const { const std::string& InnerJoinExecutor::rightVar() const { if (node_->kind() == PlanNode::Kind::kHashInnerJoin) { - return node_->asNode()->rightInputVar(); + return node_->asNode()->rightInputVar(); } else { return node_->asNode()->rightVar().first; } @@ -267,7 +267,7 @@ HashInnerJoinExecutor::HashInnerJoinExecutor(const PlanNode* node, QueryContext* folly::Future HashInnerJoinExecutor::execute() { SCOPED_TIMER(&execTime_); - auto* joinNode = asNode(node()); + auto* joinNode = asNode(node()); NG_RETURN_IF_ERROR(checkBiInputDataSets()); return join(joinNode->hashKeys(), joinNode->probeKeys(), joinNode->colNames()); } diff --git a/src/graph/executor/query/JoinExecutor.cpp b/src/graph/executor/query/JoinExecutor.cpp index 897cacf848c..2f917b8a55f 100644 --- a/src/graph/executor/query/JoinExecutor.cpp +++ b/src/graph/executor/query/JoinExecutor.cpp @@ -33,7 +33,7 @@ Status JoinExecutor::checkInputDataSets() { } Status JoinExecutor::checkBiInputDataSets() { - auto* join = asNode(node()); + auto* join = asNode(node()); lhsIter_ = ectx_->getResult(join->leftInputVar()).iter(); DCHECK(!!lhsIter_); if (lhsIter_->isGetNeighborsIter() || lhsIter_->isDefaultIter()) { diff --git a/src/graph/executor/query/LeftJoinExecutor.cpp b/src/graph/executor/query/LeftJoinExecutor.cpp index fdb3f964835..b21aaa34969 100644 --- a/src/graph/executor/query/LeftJoinExecutor.cpp +++ b/src/graph/executor/query/LeftJoinExecutor.cpp @@ -228,7 +228,7 @@ HashLeftJoinExecutor::HashLeftJoinExecutor(const PlanNode* node, QueryContext* q folly::Future HashLeftJoinExecutor::execute() { SCOPED_TIMER(&execTime_); - auto* joinNode = asNode(node()); + auto* joinNode = asNode(node()); auto& rhsResult = ectx_->getResult(joinNode->rightInputVar()); rightColSize_ = rhsResult.valuePtr()->getDataSet().colNames.size(); NG_RETURN_IF_ERROR(checkBiInputDataSets()); diff --git a/src/graph/planner/match/ShortestPathPlanner.cpp b/src/graph/planner/match/ShortestPathPlanner.cpp index 47e5c836ea1..0ad81ba3dba 100644 --- a/src/graph/planner/match/ShortestPathPlanner.cpp +++ b/src/graph/planner/match/ShortestPathPlanner.cpp @@ -30,7 +30,7 @@ namespace graph { // +------------+---------------+ // | // +--------+---------+ -// |CrossJoin| +// | CrossJoin | // +--------+---------+ // | // +--------+---------+ diff --git a/src/graph/visitor/PrunePropertiesVisitor.cpp b/src/graph/visitor/PrunePropertiesVisitor.cpp index 9af13340df7..0bc8d43c333 100644 --- a/src/graph/visitor/PrunePropertiesVisitor.cpp +++ b/src/graph/visitor/PrunePropertiesVisitor.cpp @@ -427,7 +427,7 @@ void PrunePropertiesVisitor::pruneCurrent(AppendVertices *node) { node->setVertexProps(std::move(prunedVertexProps)); } -void PrunePropertiesVisitor::visit(BiJoin *node) { +void PrunePropertiesVisitor::visit(HashJoin *node) { status_ = depsPruneProperties(node->dependencies()); } diff --git a/src/graph/visitor/PrunePropertiesVisitor.h b/src/graph/visitor/PrunePropertiesVisitor.h index a880d682b98..98c6fe9e638 100644 --- a/src/graph/visitor/PrunePropertiesVisitor.h +++ b/src/graph/visitor/PrunePropertiesVisitor.h @@ -66,7 +66,7 @@ class PrunePropertiesVisitor final : public PlanNodeVisitor { // prune properties in AppendVertices according to the used properties collected previous void pruneCurrent(AppendVertices *node); - void visit(BiJoin *node) override; + void visit(HashJoin *node) override; void visit(Union *node) override; void visit(CrossJoin *node) override; diff --git a/tests/tck/features/optimizer/PrunePropertiesRule.feature b/tests/tck/features/optimizer/PrunePropertiesRule.feature index 072d1660a94..85b906f7bb3 100644 --- a/tests/tck/features/optimizer/PrunePropertiesRule.feature +++ b/tests/tck/features/optimizer/PrunePropertiesRule.feature @@ -173,7 +173,7 @@ Feature: Prune Properties rule | id | name | dependencies | operator info | | 16 | TopN | 12 | | | 12 | Project | 9 | | - | 9 | BiInnerJoin | 22, 23 | | + | 9 | HashInnerJoin | 22, 23 | | | 22 | Project | 5 | | | 5 | AppendVertices | 4 | { "props": "[{\"props\":[\"name\"],\"tagId\":9}]" } | | 4 | Traverse | 2 | { "vertexProps": "[{\"props\":[\"name\"],\"tagId\":9}]" } | @@ -207,8 +207,8 @@ Feature: Prune Properties rule | id | name | dependencies | operator info | | 20 | TopN | 23 | | | 23 | Project | 13 | | - | 13 | BiInnerJoin | 9, 30 | | - | 9 | BiInnerJoin | 28, 29 | | + | 13 | HashInnerJoin | 9, 30 | | + | 9 | HashInnerJoin | 28, 29 | | | 28 | Project | 5 | | | 5 | AppendVertices | 4 | { "props": "[{\"props\":[\"name\"],\"tagId\":9}]" } | | 4 | Traverse | 2 | { "vertexProps": "[{\"props\":[\"name\"],\"tagId\":9}]", "edgeProps": "[{\"type\": -5, \"props\": [\"_dst\", \"_rank\", \"_type\"]}, {\"type\": 5, \"props\": [\"_dst\", \"_rank\", \"_type\"]}, {\"props\": [\"_dst\", \"_rank\", \"_type\"], \"type\": -3}, {\"props\": [\"_dst\", \"_rank\", \"_type\"], \"type\": 3}, {\"type\": -4, \"props\": [\"_dst\", \"_rank\", \"_type\"]}, {\"props\": [\"_dst\", \"_rank\", \"_type\"], \"type\": 4}]" } | @@ -287,14 +287,14 @@ Feature: Prune Properties rule | id | name | dependencies | operator info | | 21 | TopN | 17 | | | 17 | Project | 16 | | - | 16 | BiInnerJoin | 23, 14 | | + | 16 | HashInnerJoin | 23, 14 | | | 23 | Project | 5 | | | 5 | AppendVertices | 4 | { "props": "[{\"props\":[\"name\"],\"tagId\":9}]" } | | 4 | Traverse | 2 | { "vertexProps": "[{\"props\":[\"name\"],\"tagId\":9}]" } | | 2 | Dedup | 1 | | | 1 | PassThrough | 3 | | | 3 | Start | | | - | 14 | BiInnerJoin | 33, 34 | | + | 14 | HashInnerJoin | 33, 34 | | | 33 | Project | 10 | | | 10 | AppendVertices | 9 | { "props": "[{\"tagId\":10,\"props\":[\"name\"]}]" } | | 9 | Traverse | 8 | { "vertexProps": "[{\"tagId\":9,\"props\":[\"name\"]}]" } | @@ -317,7 +317,7 @@ Feature: Prune Properties rule And the execution plan should be: | id | name | dependencies | operator info | | 10 | Project | 11 | | - | 11 | BiInnerJoin | 14, 9 | | + | 11 | HashInnerJoin | 14, 9 | | | 14 | Project | 3 | | | 3 | AppendVertices | 12 | { "props": "[{\"props\":[\"name\"],\"tagId\":9}]" } | | 12 | IndexScan | 2 | | @@ -469,7 +469,7 @@ Feature: Prune Properties rule And the execution plan should be: | id | name | dependencies | operator info | | 14 | Project | 13 | | - | 13 | BiInnerJoin | 15,12 | | + | 13 | HashInnerJoin | 15,12 | | | 15 | Project | 17 | | | 17 | AppendVertices | 16 | { "props": "[{\"props\":[\"_tag\", \"name\", \"speciality\"],\"tagId\":8}, {\"props\":[\"_tag\", \"name\", \"age\"],\"tagId\":9}, {\"props\":[\"_tag\", \"name\"],\"tagId\":10}]" } | | 16 | Traverse | 2 | {"vertexProps": "[{\"props\":[\"name\", \"age\", \"_tag\"],\"tagId\":9}, {\"props\":[\"name\", \"speciality\", \"_tag\"],\"tagId\":8}, {\"props\":[\"name\", \"_tag\"],\"tagId\":10}]", "edgeProps": "[{\"type\": 3, \"props\": [\"_type\", \"_rank\", \"_dst\", \"_src\", \"likeness\"]}]" } |