-
Notifications
You must be signed in to change notification settings - Fork 483
Unexpected behavior when using empty string '' in string functions in Apache AGE #2201
Copy link
Copy link
Closed
Closed
Copy link
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
I observed an unexpected behavior in Apache AGE when using empty strings ('') as arguments in string functions such as toLower. According to the documentation, toLower(NULL) returns NULL, which is expected. However, when passing an empty string '' as the argument inside the function, the result is unexpectedly NULL. In contrast, when directly checking if '' IS NULL, it correctly returns false.
How are you accessing AGE (Command line, driver, etc.)?
- Command line
What is the command that caused the error?
SELECT * FROM cypher('test_graph', $$
RETURN toLower('') IS NULL AS ref0
$$) AS (ref0 agtype);
-- Result: true
SELECT * FROM cypher('test_graph', $$
RETURN '' IS NULL AS ref0
$$) AS (ref0 agtype);
-- Result: false
Expected behavior
The two queries executed above should both return false.
Environment (please complete the following information):
- Version: latest in docker hub
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Type
Fields
Give feedbackNo fields configured for issues without a type.