-
Notifications
You must be signed in to change notification settings - Fork 406
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
SQL Command throws Error in cypher.sql #321
Comments
Yes those regression tests are confirming that the second argument of the Cypher function cannot be NULL and cannot be a single-quoted string. |
If this has been resolved, please make sure to close the issue :) |
Sorry, I should have noted the following before suggesting closing the issue - If those regression tests are supposed to throw errors and there isn't a comment stating that, I think that a comment should be added for clarity. |
The following comments are written before those tests, so I think no additional comments will be necessary.
https://github.com/apache/age/blob/master/regress/sql/cypher.sql#L25-L26 |
@shinyaaa This isn't necessarily true anymore. The function can be called, in special cases, cypher(null, null). |
I came across some commands that throw errors in cypher.sql and I am not sure whether this is expected behavior or not.
I am unsure whether this is okay because the expected and actual results throw log these errors when running this command.
SELECT * FROM cypher('cypher', 'RETURN 0') AS r(c text);
ERROR: a dollar-quoted string constant is expected
LINE 1: SELECT * FROM cypher('cypher', 'RETURN 0') AS r(c text);
SELECT * FROM cypher('cypher', NULL) AS r(c text);
ERROR: a dollar-quoted string constant is expected
LINE 1: SELECT * FROM cypher('cypher', NULL) AS r(c text);
Are these test cases valid? Or should it be changed? like
SELECT * FROM cypher('cypher', $$RETURN 0$$) AS r(c text);
Also if these test cases are valid then is okay to add a test case like
SELECT * FROM cypher('cypher', ##RETURN 0##) AS r(c text);
since this will throw an error as well.The text was updated successfully, but these errors were encountered: