age
age copied to clipboard
Match node with not existed label
Describe the bug A clear and concise description of what the bug is.
How are you accessing AGE (Command line, driver, etc.)?
- python driver
- pgcli with load 'age'
What data setup do we need to do?
None
What is the command that caused the error?
SELECT * from cypher('agegraph', $$ MATCH (node:NodeWithKey) RETURN node $$) as (v agtype);
SELECT * from cypher('agegraph', $$ MATCH (node:NodeWithKey) RETURN node $$) as (v agtype);
label NodeWithKey does not exists
LINE 1: SELECT * from cypher('agegraph', $$ MATCH (node:NodeWithKey)...
Expected behavior return empty record
Environment (please complete the following information):
- Version: [e.g. 0.7.0]
Additional context Add any other context about the problem here.
The error, if I recall correctly, is expected behavior for an incorrect label name. However, we will review this to see if it should be changed.
With other graph databases I've used (Neo4j and RedisGraph), querying a node label or relationship type that doesn't exist simply returns no matches.
If this error is expected, is it possible to create a node label or relationship type other than by creating a node or relationship with it? If not, that makes it difficult to use for certain applications.
You can use the create_elabel(graph_name, label_name) and create_vlabel(graph_name, label_name) functions. Also, for any single graph, a vertex and an edge can't have the same label and label names are case specific.
On Sat, Jul 30, 2022 at 1:57 PM Jamie Gaskins @.***> wrote:
With other graph databases I've used (Neo4j and RedisGraph), querying a node label or relationship type that doesn't exist simply fails to match.
If this error is expected, is it possible to create a node label or relationship type other than by creating a node or relationship with it? If not, that makes it difficult to use for certain applications.
— Reply to this email directly, view it on GitHub https://github.com/apache/age/issues/186#issuecomment-1200089945, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABZW5ASSFSGNJFGDL6JRF5LVWSY4NANCNFSM5OG6HSZQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>
This is now an active task to align this behavior with other graph databases, like Neo4j.
@jrgemignani It seems the issue is now fixed?