-
Notifications
You must be signed in to change notification settings - Fork 104
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
Better error messages when forgetting to load extension #4771
Better error messages when forgetting to load extension #4771
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #4771 +/- ##
========================================
Coverage 86.31% 86.32%
========================================
Files 1397 1398 +1
Lines 59935 60213 +278
Branches 7384 7402 +18
========================================
+ Hits 51734 51977 +243
- Misses 8034 8070 +36
+ Partials 167 166 -1 ☔ View full report in Codecov by Sentry. |
Benchmark ResultMaster commit hash:
|
Benchmark ResultMaster commit hash:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@royi-luo I had a couple of comments/suggestions.
extension/json/test/error.test
Outdated
---- ok | ||
-STATEMENT CREATE (p:person {id: 8, description: to_json({"family": "anatidae", "species": [ "duck", "goose", "swan", null]})}) | ||
---- error | ||
Catalog exception: function TO_JSON does not exist. This function exists in the JSON extension. You can load the extension by running the command 'LOAD EXTENSION JSON'. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we not use the words "does not exist" and "exists" in two consecutive sentences? Something like what I suggested.
Catalog exception: function TO_JSON does not exist. This function exists in the JSON extension. You can load the extension by running the command 'LOAD EXTENSION JSON'. | |
Catalog exception: function TO_JSON is not defined. This function exists in the JSON extension. You can load the extension by running the command 'LOAD EXTENSION JSON'. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
extension/json/test/error.test
Outdated
-CASE DidNotLoadExtension | ||
-STATEMENT create node table person (id INT64, description json, primary key(id)); | ||
---- error | ||
Catalog exception: JSON is neither an internal type nor a user defined type. This type exists in the JSON extension. You can load the extension by running the command 'LOAD EXTENSION JSON'. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we also mention that the user should install the extension before loading it?
Catalog exception: JSON is neither an internal type nor a user defined type. This type exists in the JSON extension. You can load the extension by running the command 'LOAD EXTENSION JSON'. | |
Catalog exception: JSON is neither an internal type nor a user defined type. This type exists in the JSON extension. You can install and load this extension by running 'INSTALL JSON; LOAD EXTENSION JSON;'. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
@@ -180,4 +180,4 @@ abc|{l: 5, h: 32} | |||
-CASE UDTInvalidCast | |||
-STATEMENT RETURN CAST(['abc', 'def', 'ghi'] AS JSON[]) | |||
---- error | |||
Catalog exception: JSON is neither an internal type nor a user defined type. | |||
Catalog exception: JSON is neither an internal type nor a user defined type. This type exists in the JSON extension. You can load the extension by running the command 'LOAD EXTENSION JSON'. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as my above comment (what if the user didn't install the extension itself?). It makes sense to tell them about the installation step too, I think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
Benchmark ResultMaster commit hash:
|
Description
If a function cannot be found in the catalog performs a lookup in a hard-coded map and if the function name matches reports the extension the function is from. Messages are now something like:
Catalog exception: function QUERY_FTS_INDEX does not exist. This function exists in the FTS extension. You can load the extension by running the command 'LOAD EXTENSION FTS'.
Also added similar improvements to types:
Catalog exception: JSON is neither an internal type nor a user defined type. This type exists in the JSON extension. You can load the extension by running the command 'LOAD EXTENSION JSON'.
and file formats:
Binder exception: Cannot load from file type delta. Reason: Catalog exception: function delta_SCAN does not exist. This function exists in the DELTA extension. You can load the extension by running the command 'LOAD EXTENSION DELTA'.
Fixes #4760
Contributor agreement