Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jievince committed Dec 7, 2022
1 parent c96f298 commit 3ced564
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 24 deletions.
6 changes: 0 additions & 6 deletions src/graph/optimizer/rule/OptimizeLeftJoinPredicateRule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,12 +151,6 @@ StatusOr<OptRule::TransformResult> OptimizeLeftJoinPredicateRule::transform(
newLeftJoin->setLeftVar(leftJoin->leftInputVar());
newLeftJoin->setRightVar(newProject->outputVar());
newLeftJoin->setOutputVar(leftJoin->outputVar());
// LOG the col names of newLeftJoin
auto& newLeftJoinColNames = newLeftJoin->colNames();
LOG(ERROR) << "newLeftJoinColNames.size(): " << newLeftJoinColNames.size();
for (auto& colName : newLeftJoinColNames) {
LOG(ERROR) << "colName: " << colName;
}
auto* newLeftJoinGroupNode = OptGroupNode::create(octx, newLeftJoin, leftJoinGroup);
newLeftJoinGroupNode->dependsOn(leftJoinGroupNode->dependencies()[0]);
newLeftJoinGroupNode->dependsOn(newProjectGroup);
Expand Down
36 changes: 18 additions & 18 deletions src/graph/optimizer/rule/OptimizeLeftJoinPredicateRule.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,24 @@

namespace nebula {
namespace opt {
/* Before:
* HashLeftJoin({id(v)}, {id(v)})
* / \
* ... Project
* / \
* AppendVertices(v) AppendVertices(v)
* / \
* ... Traverse(e)
*
* After:
* HashLeftJoin({id(v)}, {$-.v})
* / \
* ... Project(..., none_direct_dst(e) AS v)
* / \
* AppendVertices(v) Traverse(e)
* /
* ...
*/
// Before:
// HashLeftJoin({id(v)}, {id(v)})
// | |
// ... Project
// | |
// AppendVertices(v) AppendVertices(v)
// | |
// ... Traverse(e)
//
// After:
// HashLeftJoin({id(v)}, {$-.v})
// | |
// ... Project(..., none_direct_dst(e) AS v)
// | |
// AppendVertices(v) Traverse(e)
// |
// ...
//
class OptimizeLeftJoinPredicateRule final : public OptRule {
public:
const Pattern &pattern() const override;
Expand Down

0 comments on commit 3ced564

Please sign in to comment.