diff --git a/src/validator/GoValidator.cpp b/src/validator/GoValidator.cpp index c867501c689b0cb79bf89706cfe24b278694a282..a49992e654db3b8b48e25ac51b9c419f7b8e500c 100644 --- a/src/validator/GoValidator.cpp +++ b/src/validator/GoValidator.cpp @@ -58,7 +58,8 @@ Status GoValidator::validateWhere(WhereClause* where) { } if (filter_->kind() == Expression::Kind::kLabelAttribute) { auto laExpr = static_cast<LabelAttributeExpression*>(filter_); - where->setFilter(ExpressionUtils::rewriteLabelAttribute<EdgePropertyExpression>(laExpr)); + filter_ = ExpressionUtils::rewriteLabelAttribute<EdgePropertyExpression>(laExpr); + where->setFilter(filter_); } else { ExpressionUtils::rewriteLabelAttribute<EdgePropertyExpression>(filter_); } diff --git a/tests/tck/features/go/GO.feature b/tests/tck/features/go/GO.feature index 2750ad951dcd9724138920810aa5d23ec467eb55..031255df30edafc5bcc69ff2ecb44bfd3b8b515b 100644 --- a/tests/tck/features/go/GO.feature +++ b/tests/tck/features/go/GO.feature @@ -1069,6 +1069,13 @@ Feature: Go Sentence """ Then a SyntaxError should be raised at runtime: syntax error near `| GO FRO' + Scenario: invalid condition in where + When executing query: + """ + GO FROM 'Tim Duncan' OVER like where like.likeness + """ + Then a SemanticError should be raised at runtime: `like.likeness', expected Boolean, but was `INT' + Scenario: contain When executing query: """