jrgemignani commented on issue #119:
URL: https://github.com/apache/incubator-age/issues/119#issuecomment-928160869
I am unable to reproduce this in the latest version -
psql-11.5-5432-pgsql=# drop extension age; create extension age; load
'age'; set search_path TO ag_catalog;
ERROR: extension "age" does not exist
CREATE EXTENSION
LOAD
SET
psql-11.5-5432-pgsql=# SELECT create_graph('test_graph');
NOTICE: graph "test_graph" has been created
create_graph
--------------
(1 row)
psql-11.5-5432-pgsql=# select * from cypher('test_graph', $$CREATE
(a:Person {id:1}) return a$$) as (a agtype);
a
-----------------------------------------------------------------------------
{"id": 844424930131969, "label": "Person", "properties": {"id": 1}}::vertex
(1 row)
psql-11.5-5432-pgsql=# select * from cypher('test_graph', $$CREATE
(b:Person {id:2}) return b$$) as (b agtype);
b
-----------------------------------------------------------------------------
{"id": 844424930131970, "label": "Person", "properties": {"id": 2}}::vertex
(1 row)
psql-11.5-5432-pgsql=# select * from cypher('test_graph', $$MATCH (a:Person
{id:1}), (b:Person {id:2}) CREATE (a)-[e:knows]->(b) return e$$) as (e
agtype);
e
----------------------------------------------------------------------------------------------------------------------------
{"id": 1125899906842625, "label": "knows", "end_id": 844424930131970,
"start_id": 844424930131969, "properties": {}}::edge
(1 row)
psql-11.5-5432-pgsql=# select * from cypher('test_graph', $$MATCH (a:Person
{id:1})-[e]->(b:Person {id:2}) return e$$) as (e agtype);
e
----------------------------------------------------------------------------------------------------------------------------
{"id": 1125899906842625, "label": "knows", "end_id": 844424930131970,
"start_id": 844424930131969, "properties": {}}::edge
(1 row)
psql-11.5-5432-pgsql=#
On Mon, Sep 27, 2021 at 7:53 AM Pieterjan De Potter <
***@***.***> wrote:
> When an edge is created following the documentation, the edge is created
> in opposite direction. Steps to reproduce:
>
> Create two vertices
>
> select * from cypher('test_graph', $$CREATE (a:Person {id:1}) return a$$)
as (a agtype);
> a
>
------------------------------------------------------------------------------
> {"id": 1125899906842625, "label": "Person", "properties": {"id":
1}}::vertex
> (1 row)
>
> select * from cypher('test_graph', $$CREATE (b:Person {id:2}) return b$$)
as (b agtype);
> b
>
------------------------------------------------------------------------------
> {"id": 1125899906842626, "label": "Person", "properties": {"id":
2}}::vertex
> (1 row)
>
> Create an edge between the vertices. If the edge is returned, it is
> already clear the edge has the opposite direction.
>
> select * from cypher('test_graph', $$MATCH (a:Person {id:1}), (b:Person
{id:2}) CREATE (a)-[e:knows]->(b) return e$$) as (e agtype);
> e
>
------------------------------------------------------------------------------------------------------------------------------
> {"id": 1407374883553287, "label": "knows", "end_id": 1125899906842625,
"start_id": 1125899906842626, "properties": {}}::edge
> (1 row)
>
> When querying the graph for the edge in the wanted direction, no results
> are returned.
>
> select * from cypher('test_graph', $$MATCH (a:Person
{id:1})-[e]->(b:Person {id:2}) return e$$) as (e agtype);
> e
> ---
> (0 rows)
>
> When querying the graph for the edge in the opposite direction, the edge
> is returned as a result.
>
> select * from cypher('test_graph', $$MATCH (a:Person
{id:2})-[e]->(b:Person {id:1}) return e$$) as (e agtype);
> e
>
------------------------------------------------------------------------------------------------------------------------------
> {"id": 1407374883553287, "label": "knows", "end_id": 1125899906842625,
"start_id": 1125899906842626, "properties": {}}::edge
> (1 row)
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
> <https://github.com/apache/incubator-age/issues/119>, or unsubscribe
>
<https://github.com/notifications/unsubscribe-auth/AALPO4C4PXKKLCG3J6YB25LUECAOXANCNFSM5E2YH6UQ>
> .
> Triage notifications on the go with GitHub Mobile for iOS
>
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
> or Android
>
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
>
>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]