Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue-1643 #1786

Merged
merged 1 commit into from
Jul 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

btw should we put this into binder_error.test and then split the file at some point?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To produce the error, i need a fresh database without any nodetables. So i can't put this file into binder_error.test

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