diff --git a/src/graph/visitor/FoldConstantExprVisitor.cpp b/src/graph/visitor/FoldConstantExprVisitor.cpp index 30cadcf8b25..16633288665 100644 --- a/src/graph/visitor/FoldConstantExprVisitor.cpp +++ b/src/graph/visitor/FoldConstantExprVisitor.cpp @@ -349,7 +349,7 @@ void FoldConstantExprVisitor::visitBinaryExpr(BinaryExpression *expr) { Expression *FoldConstantExprVisitor::fold(Expression *expr) { // Container expression should remain the same type after being folded - if (expr->isContainerExpr()) { + if (expr->isContainerExpr() || !status_.ok()) { return expr; } diff --git a/tests/tck/features/expression/NotIn.feature b/tests/tck/features/expression/NotIn.feature index 6fce6111f2c..60fe563f379 100644 --- a/tests/tck/features/expression/NotIn.feature +++ b/tests/tck/features/expression/NotIn.feature @@ -51,6 +51,27 @@ Feature: Not In Expression | r | | false | + Scenario: Match Not In Set + Given a graph with space named "nba" + When executing query: + """ + match p0 = (n0)<-[e0:`like`|`teammate`|`teammate`]->(n1) + where id(n0) == "Suns" + and not (e0.like.likeness in [e0.teammate.end_year, ( e0.teammate.start_year ) ] ) + or not (( "" ) not ends with ( "" + "" + "" )) + and ("" not in ( "" + "" + "" + "" )) + or (e0.teammate.start_year > ( e0.teammate.end_year )) + and (( ( ( e0.like.likeness ) ) ) / e0.teammate.start_year > + e0.teammate.start_year) + or (e0.like.likeness*e0.teammate.start_year%e0.teammate.end_year+ + ( ( e0.teammate.start_year ) ) > e0.teammate.end_year) + or (( ( ( ( e0.teammate.end_year ) ) ) ) in [9.8978784E7 ] ) + return e0.like.likeness, e0.teammate.start_year, e0.teammate.start_year, + e0.teammate.end_year, e0.teammate.end_year + limit 91 + """ + Then a SemanticError should be raised at runtime: Type error `("" NOT IN "")' + Scenario: Using NOT IN list in GO Given a graph with space named "nba" When executing query: