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.)?
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