From c59cd4d752bb6575d4706d175df6a850a7afefe2 Mon Sep 17 00:00:00 2001 From: xtcyclist <7731943+xtcyclist@users.noreply.github.com> Date: Thu, 17 Nov 2022 15:24:58 +0800 Subject: [PATCH] undo wrong fix. --- src/graph/validator/MatchValidator.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/graph/validator/MatchValidator.cpp b/src/graph/validator/MatchValidator.cpp index 227bd352fab..11bdf1adb54 100644 --- a/src/graph/validator/MatchValidator.cpp +++ b/src/graph/validator/MatchValidator.cpp @@ -560,15 +560,13 @@ Status MatchValidator::validateWith(const WithClause *with, auto label = static_cast(col->expr())->name(); auto found = withClauseCtx.yield->aliasesAvailable.find(label); DCHECK(found != withClauseCtx.yield->aliasesAvailable.end()); - /*if (!withClauseCtx.aliasesGenerated.emplace(col->alias(), found->second).second) { + if (!withClauseCtx.aliasesGenerated.emplace(col->alias(), found->second).second) { return Status::SemanticError("`%s': Redefined alias", col->alias().c_str()); - }*/ - withClauseCtx.aliasesGenerated.emplace(col->alias(), found->second); + } } else { - /*if (!withClauseCtx.aliasesGenerated.emplace(col->alias(), aliasType).second) { + if (!withClauseCtx.aliasesGenerated.emplace(col->alias(), aliasType).second) { return Status::SemanticError("`%s': Redefined alias", col->alias().c_str()); - }*/ - withClauseCtx.aliasesGenerated.emplace(col->alias(), aliasType); + } } if (!withClauseCtx.yield->hasAgg_ &&