Skip to content

Commit

Permalink
Remove unnecessary check (#3112)
Browse files Browse the repository at this point in the history
Co-authored-by: cpw <[email protected]>
Co-authored-by: Yee <[email protected]>
  • Loading branch information
3 people authored Oct 19, 2021
1 parent 7cd8e67 commit 81427ea
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/graph/optimizer/rule/UnionAllIndexScanBaseRule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ namespace nebula {
namespace opt {

// The matched expression should be either a OR expression or an expression that could be
// rewrote to a OR expression. There are 3 senarios.
// rewrote to a OR expression. There are 3 scenarios.
//
// 1. OR expr. If OR expr has an IN expr operand that has a valid index, expand it to OR expr.
//
Expand Down Expand Up @@ -162,8 +162,7 @@ StatusOr<TransformResult> UnionAllIndexScanBaseRule::transform(OptContext* ctx,
break;
}

DCHECK(transformedExpr->kind() == ExprKind::kLogicalOr ||
transformedExpr->kind() == ExprKind::kRelEQ);
DCHECK(transformedExpr->kind() == ExprKind::kLogicalOr);
std::vector<IndexQueryContext> idxCtxs;
auto logicalExpr = static_cast<const LogicalExpression*>(transformedExpr);
for (auto operand : logicalExpr->operands()) {
Expand Down

0 comments on commit 81427ea

Please sign in to comment.