Skip to content

Commit

Permalink
Merge pull request #1786 from kuzudb/issue-1643
Browse files Browse the repository at this point in the history
Fix issue-1643
  • Loading branch information
acquamarin committed Jul 9, 2023
2 parents 0448e00 + a496c11 commit 863c462
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/binder/bind/bind_graph_pattern.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,9 @@ std::vector<table_id_t> Binder::bindTableIDs(
"bindTableIDs(" + LogicalTypeUtils::dataTypeToString(nodeOrRelType) + ").");
}
auto result = std::vector<table_id_t>{tableIDs.begin(), tableIDs.end()};
if (result.empty() && tableNames.empty()) {
throw common::BinderException{"Expected a valid node name in MATCH clause."};
}
std::sort(result.begin(), result.end());
return result;
}
Expand Down
9 changes: 9 additions & 0 deletions test/test_files/exceptions/binder/empty_db_binder_error.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
-GROUP EmptyDBBinderErrorTest
-DATASET CSV empty

--

-CASE MissingQueryNode
-STATEMENT MATCH () WITH NULL AS a RETURN a;
---- error
Binder exception: Expected a valid node name in MATCH clause.

0 comments on commit 863c462

Please sign in to comment.