Skip to content

Commit

Permalink
address comment
Browse files Browse the repository at this point in the history
  • Loading branch information
nevermore3 committed Sep 22, 2021
1 parent be7db0d commit 5ce75f0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 1 addition & 2 deletions src/graph/validator/FetchVerticesValidator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
6 changes: 6 additions & 0 deletions src/graph/validator/test/QueryValidatorTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 5ce75f0

Please sign in to comment.