Skip to content

Commit

Permalink
Disable the cleanup in optimizer
Browse files Browse the repository at this point in the history
  • Loading branch information
yixinglu committed Dec 3, 2022
1 parent b829d79 commit 03db518
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/graph/optimizer/OptGroup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,13 +161,16 @@ const PlanNode *OptGroup::getPlan() const {

void OptGroup::deleteRefGroupNode(const OptGroupNode *node) {
groupNodesReferenced_.erase(node);
#if 0
// FIXME(yee): This cleanup will crash the optimizer for LDBC queries, try to fix it next PR
if (groupNodesReferenced_.empty()) {
// Cleanup all opt group nodes in current opt group if it's NOT referenced by any other opt
// group nodes
for (auto *n : groupNodes_) {
n->release();
}
}
#endif
}

OptGroupNode *OptGroupNode::create(OptContext *ctx, PlanNode *node, const OptGroup *group) {
Expand Down
3 changes: 3 additions & 0 deletions src/graph/optimizer/Optimizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,9 @@ void Optimizer::addBodyToGroupNode(OptContext *ctx,

namespace {

// The plan node referenced by argument always is in the left side of plan tree. So we only need to
// check whether the left root child of binary input plan node contains what the argument needs in
// its output columns
bool findArgumentRefPlanNodeInPath(const std::vector<const PlanNode *> &path, PlanNode *argument) {
DCHECK_EQ(argument->kind(), PlanNode::Kind::kArgument);
for (int i = path.size() - 1; i >= 0; i--) {
Expand Down

0 comments on commit 03db518

Please sign in to comment.