Skip to content

Commit

Permalink
fix clang compiler error
Browse files Browse the repository at this point in the history
  • Loading branch information
nevermore3 committed Nov 22, 2021
1 parent eb10dce commit e9f9830
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions src/graph/validator/FindPathValidator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,14 @@ Status FindPathValidator::validateWhere(WhereClause* where) {

Status FindPathValidator::validateYield(YieldClause* yield) {
if (yield == nullptr) {
return Status::SemanticError("missing yield clause.");
return Status::SemanticError("Missing yield clause.");
}
if (yield->columns().size() != 1) {
return Status::SemanticError("only support yield path");
return Status::SemanticError("Only support yield path");
}
const auto& col = yield->columns().front();
auto col = yield->columns().front();
if (col->expr()->kind() != Expression::Kind::kLabel || col->expr()->toString() != "PATH") {
return Status::SemanticError("illegal yield clauses `%s'. only support yield path",
return Status::SemanticError("Illegal yield clauses `%s'. only support yield path",
col->toString().c_str());
}
outputs_.emplace_back(col->name(), Value::Type::PATH);
Expand Down
6 changes: 3 additions & 3 deletions src/graph/validator/test/FindPathValidatorTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ TEST_F(FindPathValidatorTest, invalidYield) {
{
std::string query = "FIND SHORTEST PATH FROM \"Tim\" TO \"Tony\" OVER *";
auto result = checkResult(query);
EXPECT_EQ(std::string(result.message()), "SemanticError: missing yield clause.");
EXPECT_EQ(std::string(result.message()), "SemanticError: Missing yield clause.");
}
{
std::string query = "FIND SHORTEST PATH FROM \"Tim\" TO \"Tony\" OVER * YIELD vertex";
Expand All @@ -34,7 +34,7 @@ TEST_F(FindPathValidatorTest, invalidYield) {
"FIND ALL PATH WITH PROP FROM \"Tim\" TO \"Tony\" OVER like YIELD edge as e";
auto result = checkResult(query);
EXPECT_EQ(std::string(result.message()),
"SemanticError: illegal yield clauses `EDGE AS e'. only support yield path");
"SemanticError: Illegal yield clauses `EDGE AS e'. only support yield path");
}
{
std::string query =
Expand All @@ -49,7 +49,7 @@ TEST_F(FindPathValidatorTest, invalidYield) {
"$$.player.name";
auto result = checkResult(query);
EXPECT_EQ(std::string(result.message()),
"SemanticError: illegal yield clauses `$$.player.name'. only support yield path");
"SemanticError: Illegal yield clauses `$$.player.name'. only support yield path");
}
}

Expand Down

0 comments on commit e9f9830

Please sign in to comment.