Skip to content

Commit

Permalink
report errors on where clauses in optional match queries.
Browse files Browse the repository at this point in the history
  • Loading branch information
xtcyclist committed Jan 17, 2023
1 parent f3b1ed6 commit 8993ce2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/parser/parser.yy
Original file line number Diff line number Diff line change
Expand Up @@ -1682,7 +1682,11 @@ match_clause
$$ = new MatchClause($2, $3, false/*optional*/);
}
| KW_OPTIONAL KW_MATCH match_path_list where_clause {
$$ = new MatchClause($3, $4, true);
if ($4 != nullptr) {
throw nebula::GraphParser::syntax_error(@4, "Where clause in optional match is not supported.");
} else {
$$ = new MatchClause($3, nullptr, true);
}
}
;

Expand Down

0 comments on commit 8993ce2

Please sign in to comment.