diff --git a/src/graph/validator/FetchVerticesValidator.cpp b/src/graph/validator/FetchVerticesValidator.cpp index 0cb012fa0e9..418f332f2a3 100644 --- a/src/graph/validator/FetchVerticesValidator.cpp +++ b/src/graph/validator/FetchVerticesValidator.cpp @@ -70,8 +70,7 @@ Status FetchVerticesValidator::validateYield(YieldClause *yield) { auto pool = qctx_->objPool(); bool noYield = false; if (yield == nullptr) { - // version 3.0: return Status::SemanticError("No YIELD Clause"); - // compatible with previous versions + // TODO: compatible with previous version, this will be deprecated in version 3.0. auto *yieldColumns = new YieldColumns(); auto *vertex = new YieldColumn(VertexExpression::make(pool), "vertices_"); yieldColumns->addColumn(vertex); diff --git a/src/graph/validator/test/QueryValidatorTest.cpp b/src/graph/validator/test/QueryValidatorTest.cpp index 025e3475f5a..ac931a86420 100644 --- a/src/graph/validator/test/QueryValidatorTest.cpp +++ b/src/graph/validator/test/QueryValidatorTest.cpp @@ -950,6 +950,12 @@ TEST_F(QueryValidatorTest, GoInvalid) { auto result = checkResult(query); EXPECT_EQ(std::string(result.message()), "SemanticError: Duplicate Column Name : `id'"); } + { + std::string query = "GO FROM id(vertex) OVER * "; + auto result = checkResult(query); + EXPECT_EQ(std::string(result.message()), + "SemanticError: `id(VERTEX)' is not an evaluable expression."); + } } TEST_F(QueryValidatorTest, Limit) {